Customizing Your Wizard
The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.
The latest version of this topic can be found at Customizing Your Wizard.
You must consider the following common tasks as you customize the wizard you created with the Custom Wizard.
In the .vsz file, specify any custom parameters necessary for your wizard to work. See The .vsz File (Project Control) and Predefined Custom Wizard Symbols for more information.
If you localize your wizard to several different languages, add those language parameters to the .vsz file. See Localizing a Wizard to Multiple Languages for more information.
Customize the template files (and Templates.inf) to specify the directives for user selections.
Customize the Default.js file to specify additional special handling for your wizard. You can write your own functions, and you can use functions provided in Common.js.
Design icons and other images that your HTML user interface will use.
Design the HTML user interface.
Add symbols to the HTML symbol table to match the buttons, controls, text boxes, and other elements that your wizard uses.
The following shows an excerpt of HTML provided by the Custom Wizard:
<SYMBOL NAME="WIZARD_DIALOG_TITLE" TYPE=text VALUE="MyCustomWiz"> </SYMBOL> <SYMBOL NAME="SAMPLE_CHECKBOX" TYPE=checkbox VALUE=true> </SYMBOL>
This wizard, titled MyCustomWiz, displays a check box that is selected by default.
In the section marked
<SCRIPT LANGUAGE="JSCRIPT">
in the HTML files, add JScript function calls and access the Visual Studio Object Model to customize the behavior of your wizard. You must call these functions usingwindow.external
, as follows:window.external.AddSymbol("MAIN_FRAME_DEFAULT_STYLES", true); window.external.AddSymbol("MAIN_FRAME_STYLE_FLAGS", "");
Note
The methods, properties, and events exposed through Automation and Extensibility for Visual Studio, Visual C++ Code Model, Project Model, and Wizard Model allow you to programmatically manage all aspects of the wizard project, from creation through build, in both the JScript files and .htm files.
If necessary, customize the .vsdir file, allowing information about the .vsz file and all other templates to be understood by the shell. For example, indicate the icon resource ID, flags, localized names, and so on.
Create .htm files and template files in all languages for which your wizard needs to be localized. Add them to the appropriate project directories.
Provide context-sensitive Help for your wizard.
See Also
Custom Wizard
Creating a Custom Wizard
Steps to Designing a Wizard
Files Created for Your Wizard
Providing Context-Sensitive Help
Handling Errors in Wizards