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
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Variables in my own dialog box

Variables in my own dialog box

Scheduled Pinned Locked Moved C / C++ / MFC
question
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.
  • S Offline
    S Offline
    satcat
    wrote on last edited by
    #1

    Hi! I've done a new Dialog Box in my application that appears when the user clicks a button in the main window. I need to know if the user has clicked one button in that Dialog box but I don't know how could I check this. I can check edit boxes or Radio Buttons if I see Dialog Box's int variables values from my main window code but I don't know what could I use for checking if buttons have been clicked or not. May I use a control variable or what could I do? Thank you in advance!

    P 1 Reply Last reply
    0
    • S satcat

      Hi! I've done a new Dialog Box in my application that appears when the user clicks a button in the main window. I need to know if the user has clicked one button in that Dialog box but I don't know how could I check this. I can check edit boxes or Radio Buttons if I see Dialog Box's int variables values from my main window code but I don't know what could I use for checking if buttons have been clicked or not. May I use a control variable or what could I do? Thank you in advance!

      P Offline
      P Offline
      Prakash Nadar
      wrote on last edited by
      #2

      All u need to do is create a member variable a bool type and set it true when the user has clicked on the desired button. Now that variable button has the state. You can either pass it as a parameter to the child window or read the value from the child window. Hope this helps.


      "When death smiles at you, only thing you can do is smile back at it" - Russel Crowe (Gladiator)

      S 1 Reply Last reply
      0
      • P Prakash Nadar

        All u need to do is create a member variable a bool type and set it true when the user has clicked on the desired button. Now that variable button has the state. You can either pass it as a parameter to the child window or read the value from the child window. Hope this helps.


        "When death smiles at you, only thing you can do is smile back at it" - Russel Crowe (Gladiator)

        S Offline
        S Offline
        satcat
        wrote on last edited by
        #3

        Yes, it's perfect. Thank you :)

        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