Microsoft KB Archive/316001

= How to create a simple custom AppWizard in Visual C++ 6.0 =

Article ID: 316001

Article Last Modified on 6/2/2005

-

APPLIES TO


 * Microsoft Visual C++ 6.0 Professional Edition
 * Microsoft Visual C++ 6.0 Enterprise Edition

-



This article was previously published under Q316001



IN THIS TASK
SUMMARY
 * Requirements
 * Create an AppWizard Framework
 * Build the Custom AppWizard
 * Verify That the AppWizard Works

REFERENCES



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:
 * 4) * In step 1, select your own custom steps as a starting point for the custom AppWizard.
 * 5) * Keep the default title of CAWDemo AppWizard.
 * 6) * Type 3 for the number of steps in the wizard.
 * 7) Click Finish, and then click OK to create the framework for the new AppWizard.
 * 8) In the Workspace window, on the ClassView tab, verify that the following classes exist:
 * 9) * CCAWDemoAppWiz. This is the principal class, which interfaces between the wizard and the development environment.
 * 10) * CCustom1Dlg, CCustom2Dlg, CCustom3Dlg. These classes represent the dialog boxes for the three steps of the wizard.
 * 11) * CDialogChooser. This class handles navigation between the various steps of the wizard.

back to the top

Build the Custom AppWizard
 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

 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



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

Keywords: kbhowto kbinfo KB316001

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.