Creating a Wizard
The first step in creating a wizard is to write and debug a boilerplate application. Once you've done that, you can use Visual Studio .NET to generate a blank wizard for you. Visual Studio .NET includes a wizard named the Custom Wizard for creating wizards. This wizard generates all the files necessary to implement a wizard.To create a wizard, choose New, Project from the File menu, select Visual C++ Projects, and then select the Custom Wizard template. Type a name for the wizard in the Project Name text box. The Custom Wizard includes only two pages: an overview page and the Application Settings page. The Application Settings page lets you specify a wizard-friendly name, whether to include a user interface, and the number of pages in the wizard. The files created by the Custom Wizard are listed in Table 4-1.
Files | Description |
---|---|
Project.vsz | A text file that identifies the wizard engine and provides context and optional custom parameters. |
Project.vsdir | A text file that provides a routing service between the Visual Studio shell and the items in the wizard project. |
HTML files (optional) | Files for wizards that implement a user interface. The wizard user interface is implemented as HTML. Wizards without a user interface do not contain HTML files.The ![]() |
Script files | Wizard logic code is executed as script. A wizard includes a JScript file named ![]() ![]() |
Template files | A collection of text files in the Templates directory that contain directives. These files are parsed and inserted into the symbol table based on the user's selections. The template text files are rendered according to the user input and added to the project. The appropriate information is obtained by directly accessing the wizard control's symbol table. |
![]() | A text file that lists all templates associated with the project. |
![]() | An XML file that contains the information on the project type. |
![]() | A template file that shows how your wizard directives are used. |
![]() | A template file that contains a summary of each file created by the Custom Wizard. |
Images file (optional) | A file of images, such as icons, GIFs, BMPs, and other HTML-supported image formats, to enhance your wizard's user interface. Of course, a wizard that has no user interface does not need images. |
![]() | A file that defines the styles for the user interface. Again, if your wizard has no user interface, the Custom Wizard does not create a CSS file. |
Common.js | Common JScript functionality used by all wizards. This file isn't actually generated by the Custom Wizard—it's included in the source code that's generated. |