modal dialog not modal? 
Author Message
 modal dialog not modal?

I have a modal dialog, which in turn should display another modal dialog on
top. However, both dialogs are not really modal, I can click besides them
and continue. Both dialogs are derived from CDialog and opened with
dlg.DoModal. What am I doing wrong?

Jan Zoetekouw



Sat, 27 Jan 2001 03:00:00 GMT  
 modal dialog not modal?

Quote:

>I have a modal dialog, which in turn should display another modal dialog on
>top. However, both dialogs are not really modal, I can click besides them
>and continue. Both dialogs are derived from CDialog and opened with
>dlg.DoModal. What am I doing wrong?

Maybe you managed to have no valid main window? Is it maybe a dialog based
app?
A MFC modal dialog will try to disable it's parent window, that is given in
the constructor, like CSomeModalDialog Dlg(pParentWindow);
If you don't supply this it is assumed NULL and this causes the apps main
window to be the parent window. I think in a dialog based app there is no
main window since it is itself created "DoModal()" Just try to supply the
window that you want to be disabled for pParentWindow. Eg. "this".

cU
--

   http://djuga.home.ml.org
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Retriever 2.0 is out: http://retriever.home.ml.org

Shareware image viewer, thumbnailer & database
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Sat, 27 Jan 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Modal dialog not acting modal

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. CColorDialog.Modal() is not Modal

7. creating Modal vs. Non-Modal dialogs

8. modal dialog to modal less

9. Modal Dialog is not Displaying!!

10. not MODAL DIALOGS

11. Modal vs. Modeless dialog and controls not showing

12. Help: Modal Dialog not responding.

 

 
Powered by phpBB® Forum Software