Multiple WINDOWs/DIALOGs in each MULTIPAGE-page

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

  • Multiple WINDOWs/DIALOGs in each MULTIPAGE-page


    I have a MULTIPAGE widget running with a dialog on each of four multipage pages. So far so good.

    Now I want to modify this. The requirement is:
    I want to have TWO Windows within each Multipage-page:
    - one window for status display,
    - one scrollable window with a dialog.
    The dialog window will have multiple checkboxes or similar (defined by a GUI_WIDGET_CREATE_INFO structure) and must have a scrollbar. The status window must not be scrollable and must be visible all the time the dedicated multipage-page is displayed.

    I think about realizing this in the following way:

    Create a - in the beginning WN_UNATTACHED - (parent)-window for each multipage page.
    Create two child windows (for status and for dialog) as childs of the above parent window.
    Add a scrollbar to the dialog window.
    Then attach the parent window to the multipage-page with MULTIPAGE_AddPage();

    Is that a possible solution? Should it work?
    What do you recommend to realize it?

    Best regards
  • Hi,

    In beetween I tried it. I created one parent window containing two child windows. One of the childs is the dialog.
    Then I add this parent window to the MULTIPAGE. Unfortunately I have a problem with the focus.

    Here a code snippet:

    C Source Code

    1. WM_HWIN CreatePageWindow(void) {
    2. WM_HWIN h_parent, h_dlg;
    3. // Parent Window (later added to the multipage page)
    4. h_parent = WM_CreateWindow(0, 0, 200, 220, WM_CF_SHOW | WM_CF_DISABLED, _cbParent, 0);
    5. // Child Window (later for status information)
    6. WM_CreateWindowAsChild(0, 0, 180, 30, h_parent, WM_CF_SHOW | WM_CF_DISABLED, _cbInfo, 0);
    7. // Child Window with the Dialog itself
    8. h_dlg = GUI_CreateDialogBox(_aDialogCreate, GUI_COUNTOF(_aDialogCreate), _cbDialog, h_parent, 0, 35);
    9. // Trying to get the focus by this way doesnt work: :-(
    10. WM_SetFocus(h_dlg);
    11. return(h_parent);
    12. }
    13. void CreateMultipageMenu(void) {
    14. ...
    15. h_multipage = MULTIPAGE_CreateEx(....);
    16. h_page = CreatePageWindow();
    17. MULTIPAGE_AddPage(h_multipage, h_page, "");
    18. ...
    19. }
    Display All

    The problem:
    the dialog child window didnt get the focus when the multipage page is selected. Instead the parent window gets the focus.
    WM_SetFocus after WM_CreatDialog dont have any effect!
    Where and when have I to call WM_SetFocus?.

    Looking forward to help.
    Best regards.

    The post was edited 1 time, last by XT-Matz ().