|
-
July 14th, 2010, 01:31 AM
#1
MFC Class Wizard Problem
Hello,
I am new to VC++ and started the book 'Learn VC++ in 21 days'. I have built a VC+++ controls Dialogue box containing buttons, combo box, edit box etc. Now, I wanted to attach variables to the controls. But, when I open the MFC Class WIzard and the Member variables tab in it, I dont find any ID's(to which these variables have to be attached) in the Controls ID space. i dont know what the problem is and i can progress further only if i can find a solution to it!
-
July 14th, 2010, 01:34 AM
#2
Re: MFC Class Wizard Problem
What version of Visual C++ are you using?
-
July 14th, 2010, 01:42 AM
#3
Re: MFC Class Wizard Problem
-
July 14th, 2010, 01:50 AM
#4
Re: MFC Class Wizard Problem
try to create the project fresh once again and see, if it works fine....
-
July 14th, 2010, 02:04 AM
#5
Re: MFC Class Wizard Problem
If using VC7 to VC10 (VS2003 to VS2010) you right-click on the control and choose 'Add Variable'. The ID of the control you clicked on is already filled into the form to specify a new member variable.
In VC6 you also would do it from resource editor. If I remember rightly just double-click on the control and you get a tabbed dialog where you could add member variable or event handler.
-
July 14th, 2010, 02:27 AM
#6
Re: MFC Class Wizard Problem
 Originally Posted by Manchiraju
... when I open the MFC Class WIzard and the Member variables tab in it, I dont find any ID's(to which these variables have to be attached) in the Controls ID space. i dont know what the problem is and i can progress further only if i can find a solution to it!
What IDs for what control are missing? Note that there won't be IDC_STATIC in the list, nor any radio button ID if radio button doesn't have "Group" checkbox to be checked.
Victor Nijegorodov
-
July 16th, 2010, 04:07 AM
#7
Re: MFC Class Wizard Problem
I think maybe you need check if you choose the right class name you want.
-
July 16th, 2010, 01:26 PM
#8
Re: MFC Class Wizard Problem
Is there any possibility that you could get a newer version of VC?
It makes it difficult to answer questions for folks that are running one of the 5 newer versions made available since VC6 was released in 1998.
-
July 19th, 2010, 03:38 AM
#9
Re: MFC Class Wizard Problem
@Arijay..Hi
At work I have been allotted a computer which has VC++6. I have no other option but to work in that! But in my laptop I have got VC++2005 express edition installed. So, is VC++2005 much better than Vc++6?? and is it ok if I stick to VC++2005 or shift to the newer versions??
-
July 19th, 2010, 04:28 AM
#10
Re: MFC Class Wizard Problem
 Originally Posted by Manchiraju
@Arijay..Hi
At work I have been allotted a computer which has VC++6. I have no other option but to work in that! But in my laptop I have got VC++2005 express edition installed. So, is VC++2005 much better than Vc++6?? and is it ok if I stick to VC++2005 or shift to the newer versions??
A switch from VC6 to VS2005 (VC8) is an important decision and would generate some major portation efforts depending on the amount of code to port.
Problems with the class wizard alone surely won't justify such a decision.
In VC6 you can let the class wizard regenerate the class informations. For that you close the Visual Studio and move the <your_project>.clw file to some backup folder. After that reopen your project with Visual Studio and invoke class wizard by CTRL+W. It will ask you to create a new clw file and let you choose the source files for that. After that your class where you had problems with should be "repaired" if that was the issue.
Regards, Alex
-
July 19th, 2010, 01:34 PM
#11
Re: MFC Class Wizard Problem
 Originally Posted by Manchiraju
@Arijay..Hi
At work I have been allotted a computer which has VC++6. I have no other option but to work in that! But in my laptop I have got VC++2005 express edition installed. So, is VC++2005 much better than Vc++6?? and is it ok if I stick to VC++2005 or shift to the newer versions??
If you have a choice, use a newer version, but keep in mind the express versions of VC do not have MFC support. You'll need to get a professional version of VC2005, 2008, or 2010 in order to get MFC support. If you are a student and are trying to learn C++ and MFC then be aware that student discounts are available for the professional versions.
For your issue in VC6, you can try to close your project, delete the .clw and .ncb files and reopen the project.
-
July 19th, 2010, 01:46 PM
#12
Re: MFC Class Wizard Problem
 Originally Posted by itsmeandnobodyelse
A switch from VC6 to VS2005 (VC8) is an important decision and would generate some major portation efforts depending on the amount of code to port.
Problems with the class wizard alone surely won't justify such a decision.
Yeah, the longer a development team waits to upgrade their environment, the more difficult the upgrade usually becomes.
Part of the issue is that the compiler becomes more C++ compliant (and stricker) with each new version. So not only do you have to deal with the usual project file differences which the project upgrade wizard does a pretty good job of, but there are code changes where code written in VC6 simply will not compile in a later version (because the VC6 code wasn't compliant to begin with).
As a business, it scares me to have to depend on a particular version of a tool, so to me it makes good business sense to stay current or reasonably current. About the only reasons I can think of for an organization to continue to use a 12 year old environment is that they are dependent on 3rd party dlls that aren't available in a newer compiler version, or they are targetting very old OS's.
Of course, that's a business decision and it's up to each business to decide. However, for learning, there is little reason to ever start learning on a 12 year old compiler.
-
July 20th, 2010, 01:53 AM
#13
Re: MFC Class Wizard Problem
Thanks Arijay!
One last question about these versions. Now, should i really go for a professional version or continue with the express edition 2005? As in , I want to know what difference does the MFC support have.
Also, if I have to get a professional version, how much do i have to spend on it because I am a student and may not be able to spend much!
-
July 20th, 2010, 02:37 AM
#14
Re: MFC Class Wizard Problem
 Originally Posted by Manchiraju
Now, should i really go for a professional version or continue with the express edition 2005? As in , I want to know what difference does the MFC support have.
Also, if I have to get a professional version, how much do i have to spend on it because I am a student and may not be able to spend much!
If you decide for the express edition you should go with VS2010 cause you get most support for those newest versions. Express editions have some restricted usage which shouldn't much bother you if you were not developing commercial applications. There is also a limited extent of the EE version mostly regarding team working or build options like building with static libraries which also shouldn't bother you much.
If you go with an older version like VS2005 I would recommend to using standard or professional edition. You often can get it for little money at **** (though it is funny that older versions often were more expensive than younger ones).
-
July 20th, 2010, 11:00 AM
#15
Re: MFC Class Wizard Problem
 Originally Posted by Manchiraju
Thanks Arijay!
One last question about these versions. Now, should i really go for a professional version or continue with the express edition 2005? As in , I want to know what difference does the MFC support have.
Also, if I have to get a professional version, how much do i have to spend on it because I am a student and may not be able to spend much!
To be honest, the Express edition isn't much good for C++ development. It lacks a resource editor and doesn't have MFC support. In my opinion, if you want to develop GUI apps in Windows using VC, it makes sense to use MFC or WTL. The express editions don't support any of these features.
For academic pricing on the Professional Edition, search Bing or Google for:
"Visual Studio 'professional edition' academic pricing"
For US academic pricing, call 888.237.8376
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|