Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Tabbing in modeless dialog that is a child of a modal dialog

2 views
Skip to first unread message

Markus Kaupp

unread,
Dec 14, 2006, 9:22:53 AM12/14/06
to
Hello,

in an application I have the following window arrangement: The
application's main window is a modal dialog and there is a modeless
dialog that has that modal dialog as parent.

Now I want to be able to tab between the controls on the modeless
dialog.
But that does not work.

To solve that problem I tried to create the modeless dialog in a
separate thread with its own message loop. But the dialog seems always
to be created within the main dialog's thread. So I took the dialogs
creation back to the main dialogs thread and removed the message loop.

Can anybody tell me what I am doing wrong? Thanks in advance

Markus

KIENI

unread,
Dec 14, 2006, 9:57:59 AM12/14/06
to
Take a look at the function "IsDialogMessage();"

;)
--------------------------------------------------

Markus Kaupp

unread,
Dec 14, 2006, 10:08:14 AM12/14/06
to
KIENI wrote:
> Take a look at the function "IsDialogMessage();"
I have already tried to implement the parent as modeless dialog. In the
message loop I called IsDialogMessage using the parent dialog's handle
as parameter. But the messages have not been passed to the child
dialog.

Scott McPhillips [MVP]

unread,
Dec 14, 2006, 11:35:24 AM12/14/06
to

You need WS_EX_CONTROLPARENT style in the parent dialog.

--
Scott McPhillips [VC++ MVP]

Markus Kaupp

unread,
Dec 15, 2006, 5:48:56 AM12/15/06
to
Hi Scott,

the WS_EX_CONTROLPARENT style is set.

The parent's style flags are:
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_VSCROLL |
WS_SYSMENU
EXSTYLE WS_EX_CONTROLPARENT

The client style is set as follows:

STYLE DS_CONTROL | WS_CHILD | WS_VISIBLE | WS_BORDER
EXSTYLE WS_EX_CLIENTEDGE

Is there anything else I have to set?

Thanks

Markus

0 new messages