Thread: Multiple Dialog boxes

  1. #1
    Registered User
    Join Date
    Apr 2007
    Posts
    162

    Multiple Dialog boxes

    Hi

    I still refer to my calculator application (as I did in http://cboard.cprogramming.com/showthread.php?t=98943)

    If the main window is dialog box is it possible to open a new dialog box which wont be TASK-MODAL... I am just wondering because it would be quite understandable if it was not possible

  2. #2
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Yes, of course it's possible. With Win32, you can just create the window and show it, and it will remain open until you close it.
    Don't forget that you need a message pump for the window, as well, which might probably mean creating it in another thread.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  3. #3
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    It is possible, but I havent done it in awhile, so I cant remember how I did it, although I think it was just a setting when you create the dialog box.

    Sorry if all I could do was encourage you to keep looking.

    Elysia, I think he wants it to be a Diablog box, not a regular window.

  4. #4
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    A dialog box is basically a window, is it not?
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  5. #5

  6. #6
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    Quote Originally Posted by Elysia View Post
    A dialog box is basically a window, is it not?
    It is and it isnt, they are handled differently by the Win32 API. For example, the MessageBox() function opens a thread modal dialog box, which essentially blocks until the user selects one of the buttons. Custom dialog boxes can be made amodal or you can open a thread that does nothing but handle a modal dialog box then exit. There are probably half a dozen or more ways to do what the OP wants. It all comes down to whether he is using Standard Win32, MFC, ATL, etc.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Common Dialog boxes GetOpenFileName()
    By A10 in forum Windows Programming
    Replies: 3
    Last Post: 09-02-2008, 08:56 PM
  2. Splitting a dialog up into multiple classes
    By Just in forum Windows Programming
    Replies: 1
    Last Post: 05-29-2005, 11:11 PM
  3. Dialog Boxes
    By Thantos in forum Windows Programming
    Replies: 7
    Last Post: 08-26-2003, 12:49 PM
  4. Dialog Boxes
    By cerion in forum Windows Programming
    Replies: 4
    Last Post: 06-10-2002, 06:54 PM
  5. Tab Controls - API
    By -KEN- in forum Windows Programming
    Replies: 7
    Last Post: 06-02-2002, 09:44 AM