• Advertisement
Sign in to follow this  

adding a class

This topic is 4737 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I recently decided to learn some windows programming, and I found some tutorials on MFC. lessons 1-4 where fine then came 5 http://www.codersource.net/mfc_tutorial_Part5.html which was on dialog boxes. Step 7 is causing the problems. It says open the add cllass wizzard, which I can't find. I found 2 ways to make a new class: 1) whilst on the resource screen double click the dialog box. Thiis brings up a blue screen with some spaces for the name. affter putting the name in and pressing OK, I don't get the new header and cpp file I was supposed to get, see step 8. I'm not to sure why. 2) go to add class whilst looking at the code. This brings up a window asking what type of class to create, which I don't know. I am using a later version of visual studio to in the tutorial. If anyone knows what I should do please post, or If you know some good MFC tutorials please post them.

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Step 7:
Now click on Menu --> View --> Class Wizard or press Ctrl + W. You will be presented with a dialog asking you, if you want to create a new class. Say Yes. The wizard will create a new dialog class and related files( Newdialog.h & newdialog.cpp) for you.

Share this post


Link to post
Share on other sites
Quote:
Original post by crazy_andy
pressing ctrl W does nothing and there is no class wizzard in view or any other menu.

Can you find the class wizard in your VS.NET manual?

Share this post


Link to post
Share on other sites
there is no class wizzard in my version, I'm not using the same version as in the tutorial. There is only the add class option under view which asks me what type of class I want when the code window is open. Or When the resource window is open, It asks me for some data but dooesn't make the necessary files (the header and cpp file for the class) Also I can't find this class anywhere

Share this post


Link to post
Share on other sites
Quote:
Original post by crazy_andy
I am using a later version of visual studio to in the tutorial.
Almost all of the shortcuts in Visual Studio changed between versions 6 and 7 (and the version 8 betas have yet other shortcuts). Read the manual.

Share this post


Link to post
Share on other sites
I'm using version 7, and I don't have my manual I managed to lose it lol. I just need to know what type of class to add. If I try adding a MFC class, when the dialog is not selected I get "Object is required" error. When I select the dialog, the wizzard completes but doesn't seem to do anything.

Share this post


Link to post
Share on other sites
OK, I finally got the program working. I had to create the class manually though. I've no idea why the when I did the MFC class wizzard it didn't actually create a class. Anyone no what I was doing wrong?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement