Hello all,
In my opinion, the message will be posted from child to parent via default callback.
Is it right? To make it clear, I wrote the test code as followed:
Display All
The test result is, the message cannot be posted from child to parent via default callback?!!
Did I do something wrong? If not, then some strange issues in my project do make sense...
My emWin version is: v5.44b
Thanks,
Kenmux
In my opinion, the message will be posted from child to parent via default callback.
Is it right? To make it clear, I wrote the test code as followed:
C Source Code
- static TEXT_Handle _hText;
- static WM_HWIN _hDialog;
- static void _cbText(WM_MESSAGE * pMsg) {
- /* Handle the message(s) needed */
- switch (pMsg->MsgId) {
- case 1100:
- printf("TXT::1100\n");
- break; //no return here ... let parent do something
- }
- /* Default message handler */
- TEXT_Callback(pMsg);
- }
- static void _cbDialog(WM_MESSAGE * pMsg) {
- /* Handle the message(s) needed */
- switch (pMsg->MsgId) {
- case 1100:
- printf("DLG::1100\n");
- return;
- }
- /* Default message handler */
- WM_DefaultProc(pMsg);
- }
- void Test(void) {
- WM_HWIN hClient = WM_GetClientWindow(_hDialog);
- _hText = TEXT_CreateEx(0, 0, 80, 40, hClient, WM_CF_SHOW, 0x0, GUI_ID_TEXT0, 0);
- WM_SetCallback(_hText, _cbText);
- GUI_Delay(50);
- WM_SendMessageNoPara(_hText, 1100);
- }
The test result is, the message cannot be posted from child to parent via default callback?!!
Did I do something wrong? If not, then some strange issues in my project do make sense...
My emWin version is: v5.44b
Thanks,
Kenmux
The post was edited 2 times, last by kenmux ().