It is currently Sun, 28 May 2017 21:36:48 GMT

Author Message
 Parent problems with the CDialog::DoModal() (William A. Vandiver) wrote:

I should probably try a little harder to find the answers to my
questions before I make a post, huh?  As luck would have it, shortly
after posting this message, I noticed the System Modal property in App
Studio.  Sorry for wasting the space and anyone's time.

Thanks, Tony Vandiver

 Tue, 14 Mar 2000 03:00:00 GMT   
 Parent problems with the CDialog::DoModal()

I'm new to mfc & windows programming so please forgive my blatent
ignorance.  I'm using VC++ ver. 1.52 to develop an SDI application
that uses lots of dialog boxes.  

When I create a modeless dialog box (call it Mom), and then in turn
create a modal dialog box from within it (call it daughter), the
modality of the daughter dialog box depends on the CWnd* pParent
object passed to the constructor as follows:

case 0:  If I pass the application's (call it Grandma) m_pMainWnd
pointer, the daughter dialog box only allows user input to itself and
(much to my dismay) it's mother, but it restricts user input on

case 1:  If I construct the modal daughter with a pointer to it's
modeless mother, it won't allow user input in the mother, but it does
allow input to the main application window (granny).

I tried to create the mother as a child of the grandmother, but it had
no effect.

If this rings a bell with anyone, your help would be greatly
appreciated.  Thanks, Tony Vandiver

 Tue, 14 Mar 2000 03:00:00 GMT   
   [ 2 post ] 

Similar Threads

1.Problem with TrackPopupMenu and CDialog::DoModal


In my application the follwing might happen:
* Showing an PopupMenu using TrackPopupMenu
* An CDialog is invoked using DoModal().

The dialog has nothing to do with the PopupMenu, but it can pop-up at
anytime (The dialog is triggerd from an windowsmessage in a

The problem is when the popup-menu is dislpayed and the dialog is
shown, both the dlg and teh menu is shown simultaneously and I can not
click on any of them.

In my opinion, the popupmenu should automatically "dissapear" when the
dialog is invoked.

Why isn't it so?
Do I perhaps have to send and message to the parent of the menu?

NOTE: The dialog and the menu does NOT have the same parent.

All tips are welcome!

/Anders N

2. Problem with CDialog:DoModal()

3. CDialog DoModal exception!!!

4. CDialog::DoModal crashing!

5. Posting Message to CDialog in return from DoModal()

6. HELP! CDialog::DoModal() gives GPF

7. CDialog parent windows?

8. DoModal or not DoModal

9. DoModal problem from a floating CMenu

10. Doing stuff in DoModal() - Background thread updating UI problems

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software