Solved

Want to inherit from CObject using MS VC++ v5 ClassWizard

Posted on 1998-01-27
3
360 Views
Last Modified: 2006-11-17
New to MS Visual C++ but not to C++ programming in general. I'm building an app with MS VC++ v5, and want to create a class which inherits from CObject, not one of its derivatives (this is a base class for other "work" objects I'll create, not an object associated with UI processing). Would like to use Class Wizard so I can build components for reuse in other apps. Can this be done? If so, what are the steps? If not, any alternative approaches you can suggest?
0
Comment
Question by:frlaunt
  • 2
3 Comments
 
LVL 2

Accepted Solution

by:
mitchell042997 earned 50 total points
ID: 1179318
Choose the menu option Insert / Insert Class.  Now, just name your class and choose the base class to be CObject.  This class will now reside in ClassWizard and have all of the default comments and preprocessor marks MFC kindly enters for you.
0
 

Author Comment

by:frlaunt
ID: 1179319
Super! I'll give it a try. Thanks for your help.
0
 

Author Comment

by:frlaunt
ID: 1179320
Super! I'll give it a try. Thanks for your help.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question