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