ConsoleApp Sample: Demonstrates How to Create a Custom Application Wizard

The ConsoleApp sample illustrates how to create a custom application wizard and add it to the list of projects. ConsoleApp generates a C++ Win32 Console Application project depending on the options set by the user.

This wizard uses the VS wizard control to display an HTML interface to the user. The page's JScript code calls the control to store symbol information that is later used to parse the application code templates. After the application has been generated, the Project Model is used to set the project settings.

Security noteSecurity Note:

This sample code is provided to illustrate a concept and should not be used in applications or Web sites, as it may not illustrate the safest coding practices. Microsoft assumes no liability for incidental or consequential damages should the sample code be used for purposes other than as intended.

To get samples and instructions for installing them:

  • On the Visual Studio Help menu, click Samples.

    For more information, see Locating Sample Files.

  • The most recent version and complete list of samples is available online from the Visual Studio 2008 Samples page.

  • You can also locate samples on your computer's hard disk. By default, samples and a Readme file are copied into a folder under \Program Files\Visual Studio 9.0\Samples\. For Express editions of Visual Studio, all samples are located online.

Installing and Running the Sample

To install the wizard

  1. Copy all of the sample files to your hard disk.

  2. Copy the contents of the VCProjects folder to the Vc7\VCProjects folder in the directory where Visual Studio is installed (for example, c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\VCProjects\).

  3. Copy the contents of the VCwizards folder to the Vc7\VCWizards folder in the directory where Visual Studio is installed (for example, c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\VCWizards\).

To use the wizard

  1. Start Visual Studio.

  2. From the File menu, point to New and then click Project.

  3. In the New Project dialog box, select the Visual C++ Projects folder.

  4. The new Console Appwizard appears in the Templates pane. Double-click the icon to display the wizard.

  5. Click the Application Settings tab and select any options you want your project to have.

  6. Click Finish to generate the project.

Keywords

This sample demonstrates the following keywords:

IVCCLCompilerTool::Defines; IVCCLCompilerTool::InlineFunctionExpansion; IVCCLCompilerTool::RuntimeLibrary; IVCCLCompilerTool::UsePrecompiledHeader; IVCCLCompilerTool::UsePrecompiledHeader; IVCLinkerTool::AdditionalInputs; IVCLinkerTool::GenerateDebug; IVCLinkerTool::LinkIncremental; IVCLinkerTool::OutputFile; IVCLinkerTool::ProgramDatabaseFile; IVCLinkerTool::SubSystem; IVCWizCtlUI::AddSymbol; IVCWizCtlUI::Alert; IVCWizCtlUI::CreateGuid; IVCWizCtlUI::FindSymbol; IVCWizCtlUI::FormatGuid; IVCWizCtlUI::Load; IVCWizCtlUI::Next; IVCWizCtlUI::SetDefaults

See Also

Other Resources

Custom Wizard Samples