AlanKley
AlanKley

Reputation: 4780

How to call IsDialogMessage in a Modal Dialog

In my Win32 app, I had a modal dialog that displays settings that I had to add more settings to. In order to fit the new settings, I dropped a TabCtrl in the dialog and implemented two modeless dialogs. The UI is working switching between them but the modeless dialogs don't respond to the keyboard. In a regular app, IsDialogMessage (hWndCurModelessDialog) would be called. How would I do this for my Modal dialog containing a modeless dialog?

Upvotes: 0

Views: 1428

Answers (1)

Chris Becke
Chris Becke

Reputation: 36036

You dont. The modal dialog box function calls IsDialogMessage from its own message loop automatically.

The modeless dialogs are the 'pages' ? Make sure they are parented to the main dialog (rather than the tab control) and have the DS_CONTROL style. This style allows IsDialogMessage to recurse into a child dialogs controls when tabbing.

Upvotes: 4

Related Questions