How do I create a child window?
-
Hi all, I need to have a child window pop up (modal) when I push a button. My program is the default application created by MSVS 2005 when you select MFC. How do I do this? P.S. If I'm not being descriptive enough, tell me.
The easiest is to use a dialog as the child and call
DoModal()
. A dialog is in fact a window. If you cannot use a dialog, show the child window and disable the parent usingEnableWindow(FALSE)
. After the child is closed, enable the parent again usingEnableWindow()
.«_Superman_» I love work. It gives me something to do between weekends.
Microsoft MVP (Visual C++) -
Hi all, I need to have a child window pop up (modal) when I push a button. My program is the default application created by MSVS 2005 when you select MFC. How do I do this? P.S. If I'm not being descriptive enough, tell me.
Perhaps AfxMessageBox[^] is what you're after?
Steve