The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: lamer on May 21, 2005, 01:45:11 PM

Title: Dialog as child
Post by: lamer on May 21, 2005, 01:45:11 PM
Hi all!
The question is as follows:
I have an MDI app and a dialog which I want to behave like child window of the app.
But invoke DialogBoxParam,hInstance,IDD_DLG1,hClient,addr DialogProc,NULL
(where hClient is the MDI client handle)
does not help - the dialog just becomes modal.
I have found nothing on the net - nor examples, nor tuttorials about working with dialogs as child windows of MDI.
Anybody can give me a push?
Title: Re: Dialog as child
Post by: mnemonic on May 21, 2005, 02:04:23 PM
Hi lamer,

according to Win32.hlp DialogBoxParam (and the like) exclusively creates modal dialogs.
You should try something like CreateWindow.

Regards
Title: Re: Dialog as child
Post by: lamer on May 21, 2005, 02:33:49 PM
So I can not use the dialog resource at all?
Or, in other words, how to use the dialog with CreateWindow?
Title: Re: Dialog as child
Post by: raymond on May 21, 2005, 02:38:41 PM
Look at the CreateDialog function. It creates modeless dialog boxes.

Raymond
Title: Re: Dialog as child
Post by: pbrennick on May 22, 2005, 01:29:51 AM
CreateDialog uses CreateDialogParam to create a modeless dialog box.  Either way,  CreateWindowEx gets used to do the dirty work which is the point that mnemonic is making.  :thumbu
Paul