Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Launching another dialog box in a dialog box class

Launching another dialog box in a dialog box class

Scheduled Pinned Locked Moved C / C++ / MFC
questionhelp
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • O Offline
    O Offline
    oRion
    wrote on last edited by
    #1

    hi, I have tried to implement a error prompt dialog box which pops up when I execute some calculations in a dialog box. I have tried to use modaless dialog but the program don't seems to stop for the corrected data from the Error Window to return before continuing the routine again. What should be a good way to have a dialog box to receive the data? By Modal dialog instead? How do I actually do that inside a dialog class calling another dialog class? :~

    P 1 Reply Last reply
    0
    • O oRion

      hi, I have tried to implement a error prompt dialog box which pops up when I execute some calculations in a dialog box. I have tried to use modaless dialog but the program don't seems to stop for the corrected data from the Error Window to return before continuing the routine again. What should be a good way to have a dialog box to receive the data? By Modal dialog instead? How do I actually do that inside a dialog class calling another dialog class? :~

      P Offline
      P Offline
      Pavel Klocek
      wrote on last edited by
      #2

      oRion wrote: I have tried to use modaless dialog but the program don't seems to stop for the corrected data from the Error Window to return before continuing the routine again Modeless dialog lives it's own life after it's created, handling window messages sended to him. oRion wrote: What should be a good way to have a dialog box to receive the data? By Modal dialog instead? Yes. oRion wrote: How do I actually do that inside a dialog class calling another dialog class? There is nothing special with it - DialogBox API function or CDialog::DoModal(), if you are using MFC, executes a modal dialog. You need to set the modal dialog parent to the dialog you are executing it from. They return IDOK, if the modal dialog was closed with OK. Pavel Sonork 100.15206

      O 1 Reply Last reply
      0
      • P Pavel Klocek

        oRion wrote: I have tried to use modaless dialog but the program don't seems to stop for the corrected data from the Error Window to return before continuing the routine again Modeless dialog lives it's own life after it's created, handling window messages sended to him. oRion wrote: What should be a good way to have a dialog box to receive the data? By Modal dialog instead? Yes. oRion wrote: How do I actually do that inside a dialog class calling another dialog class? There is nothing special with it - DialogBox API function or CDialog::DoModal(), if you are using MFC, executes a modal dialog. You need to set the modal dialog parent to the dialog you are executing it from. They return IDOK, if the modal dialog was closed with OK. Pavel Sonork 100.15206

        O Offline
        O Offline
        oRion
        wrote on last edited by
        #3

        oRion wrote: How do I actually do that inside a dialog class calling another dialog class? Pavel wrote: There is nothing special with it - DialogBox API function or CDialog::DoModal(), if you are using MFC, executes a modal dialog. You need to set the modal dialog parent to the dialog you are executing it from. They return IDOK, if the modal dialog was closed with OK. Thanks for the reply. : ) I am not too sure where to set the modal dialog parent to the dialog? How to reference or get a handle in the parent dialog? :confused:

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups