Share via


Generic C++ Class Wizard

This wizard adds a C++ class to your project. This generic C++ class does not inherit from ATL or MFC.

  • Class name
    Sets the name of the new class.

  • .h file
    Sets the name of the header file for the new object's class. By default, this name is based on the name you provide in Class name. Click the ellipsis button to save the file name to the location of your choice, or to append the class declaration to an existing file. If you choose an existing file, the wizard will not save it to the selected location until you click Finish in the wizard.

    The wizard does not overwrite a file. If you select the name of an existing file, when you click Finish, the wizard prompts you to indicate whether the class declaration should be appended to the contents of the file. Click Yes to append the file; click No to return to the wizard and specify another file name.

  • .cpp file
    Sets the name of the implementation file for the new object's class. By default, this name is based on the name you provide in Class name. Click the ellipsis button to save the file name to the location of your choice. The file is not saved to the selected location until you click Finish in the wizard.

    The wizard does not overwrite a file. If you select the name of an existing file, when you click Finish, the wizard prompts you to indicate whether the class implementation should be appended to the contents of the file. Click Yes to append the file; click No to return to the wizard and specify another file name.

  • Base class
    Sets the base class for the new class.

  • Access
    Sets the access to the base class members for the new class. Access modifiers are keywords that specify the access other classes have to the class member functions. See Member-Access Control for more information about specifying access. The class access level is set to public by default.

  • Virtual destructor
    Specifies whether the class destructor is virtual. Using virtual destructors helps ensure that the correct destructor is called when instances of derived classes are deleted.

  • Inline
    Generates both the class constructor and the class definition as inline functions in the header file.

See Also

Tasks

Adding a Generic C++ Class