emWin Trial version works as expect but the full version doesn't

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

emWin Trial version works as expect but the full version doesn't

742 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Robin Fisher on Sun Dec 02 20:06:22 MST 2012
I've got a project where I was using the Trial version of the emWin library (GUIv5_7m_tl___trial.a) and everything is working correctly, however when I
upgraded my program to use the full version of the library (emWin_518_IAR650_M3_LE.a) a number of the WindowManager functions stopped working.

To make sure it wasn't just something in the version change, I re-linked the old Trial library in without changing any code, and the functions start working again!

The functions I've had problems with are:
WM_Focus - (the window/widget no longer runs the 'Has focus' message..)
WM_SelectWindow - (the window/widget no longer runs the 'Has focus' message..)
GUI_StoreKeyMsg - (The keypresses no longer call the Message handler callback.)
GUI_SendKeyMsg - (The keypresses no longer call the Message handler callback.)

Is it possible that some of the WM functions were disabled during the building of the libraries?

(I've also tried it with the emWin_516_IAR640_M3_LE.a libraries, but they also seem to be missing the functions..)

Cheers
Labels (1)
0 Kudos
2 Replies

636 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Robin Fisher on Thu Dec 06 16:11:08 MST 2012
Hey,
Thanks for running that test..

Using your test as a starting point I was able to workout what was happening.

It turns out that if you create a dialog box without any items on it that can accept focus (eg a screen with TEXT widgets on it) then the Dialog will not receive any Key press notifications, however if there are widgets on the dialog, the key press messages will be passed back up to the dialog (if the widget doesn't deal with them first).

However this isn't true for the trial version of the library. In the trial version of the library, even if the dialog is completely empty, you can still give it focus and it will accept key press messages..

A bit odd, but now I understand the limitation I can work around it by creating a custom widget which says it will accept focus, and then just passes keypresses up to the dialog.

(We're using the library on an lpc1788 using the Embedded Artists OEM board, but with custom hardware around it. We only have arrow keys to navigate, so most of our screens don't have interactible widgets on them, hence the issue..)

Anyway, Thanks for your help.
0 Kudos

636 Views
lpcware
NXP Employee
NXP Employee
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.
0 Kudos