Edit lost focus when switch keyboard

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Edit lost focus when switch keyboard

      My design includes one Edit and two keyboards( alphabet keyboard and digital keyboard). The intention is when Edit is clicked, one of the two keyboards appears. One type of keyboard can switch to another type by clicking the "abc" or "123" button.

      The implementation is like this:
      When the Edit receives WM_NOTIFICATION_CLICKED message, it creates or shows the keyboard.
      When it receives WM_NOTIFICATION_LOST_FOCUS message, it hides the keyboard.
      All the keys on the keyboard are set to lost focus with BUTTON_SetFocussable(hItem, 0).
      When the keyboard switch from one type to another, it uses WM_DeleteWindow to delete old keyboard and use GUI_CreateDialogBox() to create a new keyboard.

      This design works fine for input only alphabet or characters. However, when the keyboard is switched from one type to another, the Edit receives unexpected WM_NOTIFICATION_LOST_FOCUS message and thus hide the new keyboard.
      My question is where the keyboard still get focused although I have used BUTTON_SetFocussable? How can I keep the focus on Edit during the keyboard switch process?