Thank you. Happy Holidays and I wish you success!
Posts by AlexSapego
-
-
Thanks for the answer.Taking this opportunity, I want to say thank you for your product and your attitude towards us.I certainly read UM. At this stage, this is my main book. )Thank you for such detailed documentation. Lots of details.Developers are all different. I hope for your understanding.I still really miss a general description. Interrelation of modules. For example, with messages, not everything is clear yet.I don’t feel your library yet. But, the project is big - I hope it will come while working on it.Of course, I read about emWinSPY. But RTT doesn't work like stlink. The JTAG connector is not pulled out.And TCP / IP, at this stage, has not yet fastened. Well, you have to, if there is no other way.
-
I do it differently. Is it legal?
tskGUI
...
// Screen numbering
//enum {W_SETTINGS, W_WPRIMCH1, W_WPRIMCH2, W_WTIME, W_MAX};
// Current screen number. Declaring the function of creating a dialog.
int16_t NScreen = W_SETTINGS;
WM_HWIN (*pCreateWin[W_MAX])() =
{
CreateWSettings, CreateWPrimCh1, CreateWPrimCh2, CreateWTime,
};
WM_HWIN hCurWin = NULL;...
// Declare a callback routine on a blank screen
WM_SetCallback(WM_GetDesktopWindowEx(0), _cbBk);
// start GUI
//hCurWin = CreateWSettings();
hCurWin = pCreateWin[NScreen]();
WM_ShowWindow(hCurWin);
// Show the main menu
WM_Exec();
CleanDisplay(0xC0000000);
// Gui background Task
while(1)
{
GUI_Exec(); // Do the background work ... Update windows etc.)
osDelay(10);
}
....
static void _cbBk(WM_MESSAGE * pMsg)
{
uint32_t NCode/*, Id*/;
switch (pMsg->MsgId)
{
case WM_PAINT:
break;
case WM_NOTIFY_PARENT:
//Id = WM_GetId(pMsg->hWinSrc);
NCode = pMsg->Data.v;
switch (NCode)
{
case WM_NOTIFICATION_CHILD_DELETED:
if(NScreen < 0) NScreen = 0;
if(NScreen > W_MAX) NScreen = 0;
hCurWin = pCreateWin[NScreen]();
WM_ShowWindow(hCurWin);
break;
default:
break;
}
break;
default:
WM_DefaultProc(pMsg);
}
}......
The screen is rendered as a dialog. Like that...
WM_HWIN CreateWPrimCh1(void) {
WM_HWIN hWin;hWin = GUI_CreateDialogBox(_aDialogCreate, GUI_COUNTOF(_aDialogCreate), _cbDialog, WM_HBKWIN, 0, 0);
return hWin;
}....
The transition by the button is carried out as follows.case ID_BUTTON_BACK: // Notifications sent by 'Back'
switch(NCode) {
case WM_NOTIFICATION_RELEASED:
NScreen = W_SETTINGS;
GUI_EndDialog(pMsg->hWin, 0);
WM_HideWindow(hCurWin);
WM_Exec();
break;
}
break;....
-
I'm using stemWin.
1. How can you see how much RAM is being used in the debugger? How can I see how many windows have been created?
2. Am I correct in understanding that calling GUI_EndDialog (pMsg-> hWin, 0) deletes the window and all the widgets of that window?Thank you in advance for your response.