Content originally posted in LPCWare by Wouter on Tue Dec 04 09:29:58 MST 2012
Hi,
I just checked with the 518 BSP in Keil, IAR and LPCXpresso. In all three compilers atleast function WM_SetFocus and WM_SelectWindow work fine. In order to test it, I've modified the emWin application:
<code>
void MainTask(void);
void MainTask(void) {
WM_HWIN hDlg, hItem;
GUI_Init();
GUI_CURSOR_Show();
WM_SetDesktopColor(GUI_BLACK);
#if GUI_SUPPORT_MEMDEV
WM_SetCreateFlags(WM_CF_MEMDEV);
#endif
hDlg = GUI_CreateDialogBox(_aDialogCreate, GUI_COUNTOF(_aDialogCreate), &_cbCallback, 0, 0, 0);
while (1) {
GUI_Delay(100);
hItem = WM_GetDialogItem(hDlg, GUI_ID_CHECK2);
WM_SetFocus(hItem);
GUI_Delay(100);
hItem = WM_GetDialogItem(hDlg, GUI_ID_CHECK3);
WM_SetFocus(hItem);
}
}
</code>
The result is that the focus switches between checkbox 2 and checkbox 3 as it should be.
In order to be able to help you, please provide the following details:
- Which board do you use? Custom or any of our supported development boards?
- Which MCU do you use?
- Exactly which compiler and which version of it do you use?
- Do you use our BSP or have you got a BSP of your own?Please provide the compiler project that you are having difficulties with.