Share via


Deleting Classes

OverviewHow Do I

To delete a ClassWizard-created class from your project, you can either delete it from the header (.h) and implementation (.cpp) files in which it coexists with other classes or delete the .h and .cpp files altogether. In either case, you must update the information in the ClassWizard (.clw) file.

To delete a class

  1. Delete all references to the class from its .h and .cpp files or delete the files from the disk.

  2. On the View menu, click ClassWizard.

    If ClassWizard appears, the active project does not contain the deleted class.

  3. From ClassWizard's Project drop-down list, select the project that contains the deleted class.

  4. If ClassWizard asks you to close any files, close ClassWizard, close the files, and then restart ClassWizard.

    A message box informs you that ClassWizard cannot find the deleted class.

  5. Click OK.

    ClassWizard displays the Repair Class Information dialog box.

  6. Click Remove.

    The class is deleted from the .clw file.

    ClassWizard appears.

  7. Click OK.

See Also   Keeping ClassWizard Updated When Code Changes, Renaming or Moving Classes, Rebuilding the ClassWizard (.clw) File