Examining the Mechanics of a Wizard

You do not need to compile a wizard project to have users start using it right away. Once you have created the necessary elements, the VSDIR directs the New Project dialog box to display the wizard icon and the Add New Item dialog box to display the wizard name in the shortcut menu. Your customer can launch the wizard immediately by selecting it.

When the user launches the wizard, the environment shell cocreates the wizard engine and queries for IDTWizard. It then calls Execute to launch the wizard.

Note

If the wizard has no interface, the project is created with the supplied defaults and displayed in Solution Explorer, with the node structure supplied in the .vsz file. The rest of this topic assumes that the wizard has a UI.

If the wizard has a UI, the user accepts or changes the defaults in each control in the wizard's HTML-based UI. As the user navigates through the wizard's pages and makes changes, functions such as Navigate and Next are called in the Script section of the HTML.

Whenever the user selects different options within the wizard, the selections are captured in the symbol table in the wizard control. The symbol table matches the IDs of the controls in the wizard's HTML page to maintain a one-to-one correspondence between user selections and the symbol table.

When the user clicks Finish in the wizard UI, the JScript function OnFinish is called from the HTML script.

Note

You can customize OnFinish in Default.js to perform any additional tasks you require.

The wizard engine then scans through the template files, parsing and rendering them based on the user's choices. It copies the rendered files to the project directory and adds these files to the project. The newly created project is loaded in the Visual Studio environment, and the project's nodes and files are displayed in Solution Explorer.

See Also

Tasks

Creating a Custom Wizard

Concepts

Steps to Designing a Wizard

Customizing Your Wizard

Reference

VCWizCtl

Other Resources

Custom Wizard Samples