vilius
June 14th, 2005, 05:59 PM
The design of my dialog window is so that two controls should overlap.
One of these controls is Tab control.
some thoughts about z-order of child controls:
as I undestood the order(z-order) of controls I place in dialog editor depends on order of text lines in resource file for example some_file.rc:
DIALOG_MAIN DIALOGEX 0, 0, 311, 167
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CENTER | WS_MINIMIZEBOX | WS_MAXIMIZEBOX |
WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
EXSTYLE WS_EX_APPWINDOW
CAPTION "Entry"
MENU MENU_MAIN
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
LTEXT "Static",IDC_STATIC,37,78,106,30,WS_BORDER
CONTROL "",TAB_MAIN,"SysTabControl32",0x0,111,29,174,46
END
In this sample:
IDC_STATIC should be below TAB_MAIN( don't foget - controls overlap )
So, the dialog editor renders controls corectly, but only in design view.
After execution Tab control is below IDC_STATIC !
I replaced tab control with a list control and everything worked as expected.
( the problem is tab control ? )
The question -
how to put some (one) controls behind Tab control in my dialog ?
One of these controls is Tab control.
some thoughts about z-order of child controls:
as I undestood the order(z-order) of controls I place in dialog editor depends on order of text lines in resource file for example some_file.rc:
DIALOG_MAIN DIALOGEX 0, 0, 311, 167
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CENTER | WS_MINIMIZEBOX | WS_MAXIMIZEBOX |
WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
EXSTYLE WS_EX_APPWINDOW
CAPTION "Entry"
MENU MENU_MAIN
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
LTEXT "Static",IDC_STATIC,37,78,106,30,WS_BORDER
CONTROL "",TAB_MAIN,"SysTabControl32",0x0,111,29,174,46
END
In this sample:
IDC_STATIC should be below TAB_MAIN( don't foget - controls overlap )
So, the dialog editor renders controls corectly, but only in design view.
After execution Tab control is below IDC_STATIC !
I replaced tab control with a list control and everything worked as expected.
( the problem is tab control ? )
The question -
how to put some (one) controls behind Tab control in my dialog ?