I think you are using the wrong style. WS_EX_CONTROLPARENT is apparently
intended for non-dialog windows that contain controls.
For what you're trying to do, you need to be sure to give your *sub-dialogs*
the DS_CONTROL and WS_CHILD styles. Then, the Windows dialog manager should
automatically handle normal tabbing between the main parent dialog's and
each of the child sub-dialogs' controls as if there were all part of one
Note that DS_CONTROL is not available under Windows 3.1 and versions of
Windows NT prior to 4.0. Under those environments, the child sub-dialogs
will work properly with the mouse, but keyboard tabbing won't. If you want
to run under 3.1 or pre-4.0 NT with proper tabbing you will have to
implement it yourself.
Boston, USA :: http://python.ics.uci.edu/~marnold/
C++/MIDI/Win32/95 developer :: e/DM/7R7/RF/C&E/A-Box
Remove "kill.da.spam." prefix to obtain my valid email address.
>I have a problem with tab controls:
>I am using a tab ctrl in a modal dialog. The tab control itself contains
>several child dialogs of which only one is visible at a time - depending on
>the selected tab.
>When tabbing forward through the dialog with the Tab key, the focus should
>- from the control before the tab control to the active tab itself,
>- then to the first control in the tab control's active child dialog,
>- then to the next control in the child dialog and so on to the last,
>- then to the next control following the tab control
>Tabbing backward should work analogously.
>Though I keep experimenting with the WS_TABSTOP and WS_EX_CONTROLPARENT
>style flags, there seems to be no possible way. Either the dialog "hangs"
>after pressing the Tab key, or some items are skipped.
>Is there any solution easier than intercepting the Tab key and handling the
>tabbing in the program?
>Thanks in advance, Uli