Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to create new non MFC class using Class Wizard

Status
Not open for further replies.

MindCracker

Programmer
Aug 27, 2002
21
0
0
GB
Hi.

I am a fresh Visual C++ Programmer. can anyone please advise me how to add a new non-MFC class using ClassWizard.

For example,
I want to create my own class called CImporter based on the base class of CMyRecordView which is not the Visual C++ MFC Class. How am I supposed to do that???

I did this in the ClassView by selecting the generic class which is derived from CRecordView. The new class appears in the ClassView List but not in the ClassWizard Class Name list. Why is that?

Please help!!
thanks






 
It doesn't appear in the Class Wizard list because MFC has no way knowing how you want handle messages, etc. in your custom class. Unfortunately, you have to do all the message processing, variable adding/mapping yourself when you create a generic class.
 
Hi, thank you for your reply. Sorry, I am a bit confused. If I do all these message processings, variable adding or mapping as you said, would the name appear in the Class Wizard?

I have a source code from CodeGuru. It has a non MFC-base class and I wonder how it could appear in the Class Wizard. Any tips to do that?

Is there any possible way to make MFC to know how I handle the messages? let's say, I attached the source file (the one that is defined in a non-MFC class) from the CodeGuru to my workspace. How am I supposed to make it visible in the Class Wizard since the file itself has all the message processing and variables defined.

Please help me. Thank you so much for you reply.




 
I don't think it's possible I'm afraid. But why do you want it to appear in the class wizard anyway? Typically, you would only use the class wizard to add functionality to an MFC class. If you are defining a 'custom' generic class then you are essentially committing yourself to doing all the coding for that class!

Please tell me what functionality your generic class requires to integrate with your project and perhaps I can help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top