Dialog-based app and modal dialog 
Author Message
 Dialog-based app and modal dialog

Why does dialog-based app use a modal dialog?
I'd rather expect a modeless dialog, which is more like a regular window.
What is the reason for this?

Thanks



Sun, 25 Jul 2004 14:57:44 GMT  
 Dialog-based app and modal dialog
BTW Modal in MFC is the same modeless with disable Parent , but nobody stop
you instead of
DoModal() call Create() in CYourApp::InitInstance() to receive Modeless dlg
.
Maybe you can ask why such option MFC guys not set in App Wizard when
application creating ?
They want some training for our fingers , IMHO.
Arkady
Quote:

> Why does dialog-based app use a modal dialog?
> I'd rather expect a modeless dialog, which is more like a regular window.
> What is the reason for this?

> Thanks



Sun, 25 Jul 2004 17:08:29 GMT  
 Dialog-based app and modal dialog

Quote:

> Why does dialog-based app use a modal dialog?
> I'd rather expect a modeless dialog, which is more like a regular window.
> What is the reason for this?

> Thanks

The reason is that when the dialog returns the application closes.
DoModal does not return until the dialog is closed.  If you called
Create to use a modeless dialog it would return immediately and the
application would close immediately.  

--
Scott McPhillips [VC++ MVP]



Mon, 26 Jul 2004 11:00:07 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Executing modal tabbed dialog from a dialog-based application

2. modal dialogs on top of modal dialogs...

3. Showing a modal dialog in a modal dialog application

4. modal dialog spawning a modal dialog

5. Modal dialog over a modal dialog ( How to...?)

6. Modeless dialog in a dialog-based app

7. dialog within dialog based apps

8. Showing taskbar visible dialog from dialog based app

9. 2nd Dialog never appears in Dialog based app

10. HOWTO: hide dialog when a dialog-based app starts

11. dialog based app making modeless dialogs

12. PBM: Message box not displayed after main dialog box is closed in MFC dialog-based app

 

 
Powered by phpBB® Forum Software