I used the GUI_BUILDER to create 2 screens and another one that is instanciated twice a child of the first 2 screens.
Display All
I created for each dialog enums without taking care of unique ID, so the IDs for each is starting with :
I never experienced problem when using WM_GetDialogItem() in screens without child window. But when I have child window WM_GetDialogItem(handleScreen1, ID_LISTVIEW) returns a wrong ID, alias the handle of the widget in the child window that matches the one as given as argument.
Are the IDs of windows and child window ordered at the same level so that when calling WM_GetDialogItem() the first ID that is matching is returned ?
So that I will have to use unique ID for them ?
Can I safely use "common" ID on dialog'widget that have the parent as background ?
thank you.
using : stemwin v5.40
Source Code
- WM_HWIN CreateScreen1(void) {
- WM_HWIN hWin;
- hWin = GUI_CreateDialogBox(_aDialogCreate, GUI_COUNTOF(_aDialogCreate), _cbDialog, WM_HBKWIN, 0, 0);
- CreateChildWindow(hWin, <position relative to the window>);
- return hWin;
- }
- WM_HWIN CreateScreen2(void) {
- WM_HWIN hWin;
- hWin = GUI_CreateDialogBox(_aDialogCreate, GUI_COUNTOF(_aDialogCreate), _cbDialog, WM_HBKWIN, 0, 0);
- CreateChildWindow( hWin, <position relative to the window>);
- return hWin;
- }
- int CreateChildWindow(WM_HWIN hParent, int x0, int y0) {
- WM_HWIN hWin;
- assert( pHdle );
- hWin = GUI_CreateDialogBox(_aDialogCreate, GUI_COUNTOF(_aDialogCreate), _cbDialog, hParent, x0, y0);
- return (hWin) ? 0 : 1;
- }
I created for each dialog enums without taking care of unique ID, so the IDs for each is starting with :
I never experienced problem when using WM_GetDialogItem() in screens without child window. But when I have child window WM_GetDialogItem(handleScreen1, ID_LISTVIEW) returns a wrong ID, alias the handle of the widget in the child window that matches the one as given as argument.
Are the IDs of windows and child window ordered at the same level so that when calling WM_GetDialogItem() the first ID that is matching is returned ?
So that I will have to use unique ID for them ?
Can I safely use "common" ID on dialog'widget that have the parent as background ?
thank you.
using : stemwin v5.40