Click to See Complete Forum and Search --> : Creating Dialog Box


delbert Harry
April 21st, 1999, 12:09 PM
How do you create a Dialog Box from a class with a CWnd base class?

Joe Farkas
April 21st, 1999, 03:28 PM
In VisualC++, a dialog box is derived from CDialog. You could create a modeless dialog box class, and create an instance of it in the CWnd
derived class. You would need to create a function such as GetParent() in the dialog box class, then in the CWnd, OnInitDilaog() function,
pass the address of the parent DialogBoxClass->GetParent(this); Then you can show, or not show the parent window.
Create the Dialog box, and make controll functions there. I have an example of this kind of code that works, I could EMail it to you if you
were interested. Let me know if this helps at all.
Joe Farkas
farkas_3@msn.com
farkas-j@grayson.com