Dynamic dialog: moving focus issue

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

  • Dynamic dialog: moving focus issue

    Hi all,

    I tried to create a dynamic dialog with different widgets appear depending on runtime parameters.
    I did it like Adrian recommended in this thread: I create a dialog just containing a framewin, and while WM_INIT_DIALOG of the framewin I create different checkbox widgets with CHECKBOX_CreateEx(...).

    The result is, that I cannot move the focus with KEY_TAB between the checkboxes.
    In contrast, if I create the dialog with the complete GUI_WIDGET_CREATE_INFO structure then focus moves between the checkboxes as expected.

    Where is my mistake?
    Matz
  • OK, I got it by myself.

    For all stucking on the same problem:

    The reason was, that I attached the dialog widget (checkbox) to the framewin, instead of attaching it to the client window of the framewin:

    C Source Code

    1. hClientwin = WM_GetClientWindow(hFramewin);
    2. CHECKBOX_CreateEx(10, 150, 200, 0, hClientwin, WM_CF_SHOW, ...);


    Often the simple things causes trouble. :)

    Regards
    Matz