Thread: DoModal() problem --> pls help.

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,268
    DoModal() creates a dialog that MUST be dealt with before the user can move to another task ie a critical error, log on screen ect. Therefore you should not be able to switch to another dialog/application until you have closed the modal one.
    Incorrect. All MFC dialog applications are modal by default, and switching to another dialog/application is no problem at all.

    Intruder, maybe you could post the CDialog derived class that is giving you trouble.

  2. #2
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,868
    >> Incorrect. All MFC dialog applications are modal by default, and switching to another dialog/application is no problem at all.<<

    OK. My experience tells me otherwise.
    AFAIK;
    Any WIN32 (MFC) application is not modal/modeless.
    The apps windows/dialogs are created modal or modeless. For example the 'About' dialog created with all MFC apps is modal.

    MSDN under CDialog :: DoModal()

    “This member function handles all interaction with the user while the dialog box is active. This is what makes the dialog box modal; that is, the user cannot interact with other windows until the dialog box is closed.”

    Again from MSDN
    “You can use class CDialog to manage two kinds of dialog boxes:

    Modal dialog boxes, which require the user to respond before continuing the program

    Modeless dialog boxes, which stay on the screen and are available for use at any time but permit other user activities “
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. small -> big -> bigger -> bigger than bigger -> ?
    By happyclown in forum A Brief History of Cprogramming.com
    Replies: 9
    Last Post: 03-11-2009, 12:12 PM
  2. WSAD Problem Pls Help
    By Ti22 in forum Game Programming
    Replies: 1
    Last Post: 01-16-2005, 11:24 AM
  3. pls help i cant find the problem :(((
    By condorx in forum C Programming
    Replies: 3
    Last Post: 11-07-2002, 09:05 AM
  4. half ADT (nested struct) problem...
    By CyC|OpS in forum C Programming
    Replies: 1
    Last Post: 10-26-2002, 08:37 AM
  5. Spot the problem..a test question, pls help!
    By Unregistered in forum C++ Programming
    Replies: 10
    Last Post: 02-05-2002, 01:40 AM