Class Wizard
Class Wizard
In developing C++ applications, you will do a lot of work with your own classes. Develo
per Studio provides you with the ClassWizard to help in organizing your classes and
integrating your classes with Windows. ClassWizard may be started from the View menu
or by pressing Ctrl+W. The ClassWizard dialog box is made up of several different tabs,
or pages, each of which allows you to work with different aspects of your classes. We
will look at each of these tabs in the following sections
Message Maps
The Message Maps page allows you to work with assigning message handlers to Win
dows messages that your application will receive. This is really the heart of programming
in the Windows event-driven programming model. The Message Maps tab is shown in
Figure1
Member Variables
The Member Variables page, shown in Figure 2, is used to create member variables of
your class that will be used to work with controls in dialog boxes. Unfortunately, it does
not allow you to work with more general sorts of member variables
Figure 2 - Class Wizard—Member Variables.
Automation
The Automation tab, shown in Figure 3, helps you work with the methods and properties
associated with classes that use Automation.
The ActiveX Events tab, shown in Figure 4, allows you to easily manage the ActiveX
events that are supported by your ActiveX classes.
Class Info
The Class Info tab, shown in Figure 5, will show you some general information about
your classes, including the header and source files that it is defined in, as well as its base
class and any resource associated with it.
The Add Class button provides a quick and easy way to create a new class in your
project. The New Class dialog box, which is presented when you choose New, allows
you to choose the name for your new class and the base class that it derives from. You
may select the file to create the class in and specify a particular resource that should be
associated with the class. If the base class you choose can support Automation, you may
specify options. The new class can also be automatically added to the Component
Gallery.
In addition, you may choose the From a Type Library option when adding a new class.
This will allow you to create classes based on an existing COM type library.