Hi
I have made two windows(dialogs) by emwin gui builder in my project, first window has a button and 2nd window has an edit box. i want to change text of edit box of 2nd window when i click on 1st window button directly as follows:
switch(NCode) {
case WM_NOTIFICATION_CLICKED:
// USER START (Optionally insert code for reacting on notification message)
// USER END
sprintf(tstr,"fwin:%ld %ld \n\r",dialogTest,WM_GetDialogItem(dialogTest,(GUI_ID_USER + 0x01)));
_DBG_(tstr);
//WM_ShowWindow(dialogTest);
//WM_Paint(dialogTest);
EDIT_SetText((EDIT_Handle)WM_GetDialogItem(dialogTest,(GUI_ID_USER + 0x01)),"thats ok");
break;
as you can guess (GUI_ID_USER + 0x01) is id of edit box. but calling Edit_SetText() couses a HardFault.
By the way i know i can change the editbox text in wm_paint message of 2nd window, but i want to know if i can change it directly from another window or not.
thanks.
I have made two windows(dialogs) by emwin gui builder in my project, first window has a button and 2nd window has an edit box. i want to change text of edit box of 2nd window when i click on 1st window button directly as follows:
switch(NCode) {
case WM_NOTIFICATION_CLICKED:
// USER START (Optionally insert code for reacting on notification message)
// USER END
sprintf(tstr,"fwin:%ld %ld \n\r",dialogTest,WM_GetDialogItem(dialogTest,(GUI_ID_USER + 0x01)));
_DBG_(tstr);
//WM_ShowWindow(dialogTest);
//WM_Paint(dialogTest);
EDIT_SetText((EDIT_Handle)WM_GetDialogItem(dialogTest,(GUI_ID_USER + 0x01)),"thats ok");
break;
as you can guess (GUI_ID_USER + 0x01) is id of edit box. but calling Edit_SetText() couses a HardFault.
By the way i know i can change the editbox text in wm_paint message of 2nd window, but i want to know if i can change it directly from another window or not.
thanks.
The post was edited 1 time, last by mtajian ().