How to create a simple custom AppWizard in Visual C++ 6.0 (316001)



The information in this article applies to:

  • Microsoft Visual C++, 32-bit Professional Edition 6.0
  • Microsoft Visual C++, 32-bit Enterprise Edition 6.0

This article was previously published under Q316001

SUMMARY

Visual C++ 6.0 includes a variety of application wizards (known as AppWizards), which guide you step-by-step through the process of creating a new project. With Visual C++, you can also create your own custom AppWizards, so that you can offer developers a different way to create new projects.

This article describes how to create a simple custom AppWizard for Visual C++ 6.0.

back to the top

Requirements

This article assumes that you are familiar with Visual C++ programming with Microsoft Foundation Classes (MFC).

back to the top

Create an AppWizard Framework

  1. Start Visual C++ 6.0.
  2. Create a new Custom AppWizard project named CAWDemo; the Custom AppWizard wizard starts.
  3. In the wizard, follow these steps:
    • In step 1, select your own custom steps as a starting point for the custom AppWizard.
    • Keep the default title of CAWDemo AppWizard.
    • Type 3 for the number of steps in the wizard.
  4. Click Finish, and then click OK to create the framework for the new AppWizard.
  5. In the Workspace window, on the ClassView tab, verify that the following classes exist:
    • CCAWDemoAppWiz. This is the principal class, which interfaces between the wizard and the development environment.
    • CCustom1Dlg, CCustom2Dlg, CCustom3Dlg. These classes represent the dialog boxes for the three steps of the wizard.
    • CDialogChooser. This class handles navigation between the various steps of the wizard.
back to the top

Build the Custom AppWizard

  1. Build the skeleton AppWizard.

    As part of the build process, the destination file CAWDemo.awx is copied to the following folder:

    \Program Files\Microsoft Visual Studio\Common\MSDev98\Template

  2. In Windows Explorer, move to the folder listed in step 1, and then verify that the CAWDemo.awx file and the help file named CAWDemo.hlp both appear in this folder.
back to the top

Verify That the AppWizard Works

  1. Close the CAWDemo project in Visual C++.
  2. On the File menu, click New.
  3. In the New dialog box, click the Projects tab, and then verify that CAWDemo AppWizard appears as a project type.
  4. Select CAWDemo AppWizard, type a project name, type a location, and then click OK.
  5. Verify that the first dialog box appears for your custom AppWizard, and then click Next two times to move to the second and third dialog boxes.
  6. Click Finish to create the new project.
  7. In the New Project Information dialog box, click OK to accept the project settings, and then verify that Visual C++ creates your new project.
back to the top

REFERENCES

For more information about creating a custom AppWizard, search the MSDN library for "Creating a Custom AppWizard". Alternatively, you can find this information in the Visual C++ documentation under the following outline of topics:

\ Using Visual C++ \ Visual C++ Programmer's Guide \ Beginning Your Program

MSDN Library Source Code

  • The complete source code for the CustomApplication Project Wizard is named CUSTOMWZ.
  • The HIERWIZ project is an example of a custom AppWizard, based on your own custom steps.
  • The LOGOWIZ project is an example of a custom AppWizard that is a variant on the standard MFC AppWizard.
If you have the MSDN library on CD-ROM, visit the following Microsoft Web site:

Welcome to the MSDN Library
http://msdn.microsoft.com/library

back to the top

Modification Type:MajorLast Reviewed:6/2/2005
Keywords:kbhowto kbinfo KB316001 kbAudDeveloper