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. MFC C++ Help...Anyone

MFC C++ Help...Anyone

Scheduled Pinned Locked Moved C / C++ / MFC
c++htmlhelp
6 Posts 3 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.
  • P Offline
    P Offline
    pcxboy
    wrote on last edited by
    #1

    Hello, I am currently working on a project, also, I am new to code project. Anyways, I have done HTML before, and I know that when a button is clicked in HTML, you can assign code to it, to have it connect to wherever you want. In MFC, I have three classes created. One is the ATM class (when the program is run, it starts here), the other two are the checking and savings class. When the ATM dialog comes up, there are two buttons, the checking and savings button. Basically ;P I want to make it so that when the savings button is clicked in the ATM dialog, it SWITCHES to the savings dialog. And the same with the checking button. ANY help would be greatly apprecited. Please.:confused:

    B 1 Reply Last reply
    0
    • P pcxboy

      Hello, I am currently working on a project, also, I am new to code project. Anyways, I have done HTML before, and I know that when a button is clicked in HTML, you can assign code to it, to have it connect to wherever you want. In MFC, I have three classes created. One is the ATM class (when the program is run, it starts here), the other two are the checking and savings class. When the ATM dialog comes up, there are two buttons, the checking and savings button. Basically ;P I want to make it so that when the savings button is clicked in the ATM dialog, it SWITCHES to the savings dialog. And the same with the checking button. ANY help would be greatly apprecited. Please.:confused:

      B Offline
      B Offline
      Blake Miller
      wrote on last edited by
      #2

      Use the ClassWizard to associate an action with the click of the buttons. It will make a stub function for eahc button, within the stub fucntion for each butotn, invoke the dialog you want.

      P 2 Replies Last reply
      0
      • B Blake Miller

        Use the ClassWizard to associate an action with the click of the buttons. It will make a stub function for eahc button, within the stub fucntion for each butotn, invoke the dialog you want.

        P Offline
        P Offline
        pcxboy
        wrote on last edited by
        #3

        I havent used MFC before, so I beg of you, could I please have step by step instructions?

        C 1 Reply Last reply
        0
        • B Blake Miller

          Use the ClassWizard to associate an action with the click of the buttons. It will make a stub function for eahc button, within the stub fucntion for each butotn, invoke the dialog you want.

          P Offline
          P Offline
          pcxboy
          wrote on last edited by
          #4

          Also, how do I invoke the dialog I want?

          C 1 Reply Last reply
          0
          • P pcxboy

            I havent used MFC before, so I beg of you, could I please have step by step instructions?

            C Offline
            C Offline
            Christian Graus
            wrote on last edited by
            #5

            It's got nothing to do with MFC, it's your IDE. I think if you click on the button in the desiginer, you'll get a drop down list along the menu bar, if you choose a message, it is added. Otherwise, I'm pretty sure that double clicking on the button in the designer will add it. If you're using VS.NET 2002 or 2003, the properties window ( right click and choose properties if you can't see one ) has a little lightning flash icon. This will list all messages possible to override via the IDE for the selected control. Find 'onclick' ( or 'click' maybe ) and in the text box, put a name for your message handler, and it will be added for you. Christian I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer

            1 Reply Last reply
            0
            • P pcxboy

              Also, how do I invoke the dialog I want?

              C Offline
              C Offline
              Christian Graus
              wrote on last edited by
              #6

              Read the C++ FAQ before asking any more of these questions, please. MyDialog dlg; if (dlg.DoModal() == ID_OK) { // do stuff here. } Christian I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer

              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