Custom Wizards

Custom Wizards

  • Comments 12

My name is Martha Wieczorek; I am a Software Design Engineer in Test in Visual C++ IDE team. I am going to talk about Custom Wizards and the changes made to this wizard in Visual Studio codename Orcas.

 

Wizard is the name for a Visual Studio feature that facilitates the creation of new projects or items. Each of the project types listed in the New Project Dialog and Add Project dialogs is a wizard, as are each one of the items in the Add New Item and New Class Dialog. Some of the wizards create several files and may even present a user interface to allow the user further customization.  

 

If you want to routinely create a new project item template based on an existing type, the custom wizard can help you create your own wizards. You can copy and customize existing project and item templates or even create whole new templates from scratch.

 

Our team has been using custom created wizards for many purposes, such as:

 

·   to facilitate the creation of new IDE tests that conform to our internal testing requirements,

·   for automation standards designed to raise the quality and effectiveness of the automated testing, and

·   to make the automation easier to learn and maintain.

 

We pack the files into a setup project and create an msi output to be able to easily share these wizards with all members of our team.

All our shipped wizards are based on the same mechanism, making it very easy to customize or create your own versions. On MSDN you can find good documentation about the Object Models you can access, and a description of contents and uses of the new files created by the Custom Wizard. For further reference please go to: Designing a Wizard, and Inside Visual C++ Wizards

If you want to use our shipped wizards as an example you can find them under Visual Studio Install Directory\VC\VCWizards.

The Custom Wizard has been updated for Visual Studio Codename Orcas, to be able to use the wizard under the least privileged user. On previous versions, the wizard created the files in “Program Files”; now the files are created by default under the “My Documents” folder.  Visual Studio Codename Orcas will populate the New Project Dialog with custom wizard files from both locations, “Program Files” and “My Documents”.

Note that the wizards under “My Documents” will show in the New Project dialog under Wizards node.

I welcome any questions you might have about Custom Wizards or feature requests for future versions.

Thanks,
Martha Wieczorek
Visual C++ IDE Team

  • Why place them under "My Documents"?

    I hate that Microsoft products such as PowerShell and Visual Studio create folders in the user's documents folder rather than under the application data folder. Visual Studio is an application, not a user. I am the user, I should choose what goes in my documents directory.

  • Agreed, I hate it when applications create folders in My Documents. They should all be in Application Data unless I can choose the location myself.

    At least it sounds like this is only the "default" location though, so for this it probably isn't an issue.

  • Is it possible to create custom item template for Visual C++ projects? MSDN said: ...

    "<ProjectType> CSharp/VisualBasic/Jsharp/Web </ProjectType>"...

  • It is regretted that author don't visit own blog...

  • Some features in the IDE allow you to redirect specific items to other folders, but there’s not a way to universally switch VS to using a different folder.  

    The reason this folder is in My Documents and not Application Data is that it is used to store user data, not application data (e.g. projects)

  • Is it possible to create custom item template for Visual C++ projects?

    Yes, You can look at: VC\VCWizards\CodeWiz  or \VC\vcprojectitems for samples on how to do that

  • Can I create my wizard in MS Visual Studio 2005?

  • How can I create such vizard in  Visual Studio 2005?

  • Is there any chance of seeing a complete rewrite of this API?

    It's ridiculous that in this age of .NET and Winforms, we have to write C++ custom wizards in... Javascript and HTML...

  • Hello

    Is it possible to write Longhorn style wizards in VC++ Orcas ? Iam talking about the wizard where the page titles are listed on left side in a tree control and the main page is displayed on right side (similar to Add Roles wizard in Longhorn)

  • Hi Martha

    Hope you'll fix this Custom Wizard bug for Orcas (and for VS2005 to please ) -

    In VS2005 there is a small bug (annoyance) when running the C++ Custom Wizard under a normal user (Restricted/Limited account). After it has created the wizards .VSZ file in the user selected folder it also tries to create this file in a subfolder to the VC8 app folder (eg. "Microsoft Visual Studio 8\VC\vcprojects\MyNewWizard.vsz") which results in two popup error messages. First one with an "Access denied" and 2nd with an empty string.

    (Checked with Marks Russinovich's and Bryce Cogswell's Process Monitor from Windows Sysinternals: http://www.microsoft.com/technet/sysinternals/ProcessesAndThreads/processmonitor.mspx )

    --Henrik

  • LOL

    Martha wrote:

    "...

    The Custom Wizard has been updated for Visual Studio Codename Orcas, to be able to use the wizard under the least privileged user.

    ..."

    Sorry,- I obviously didn't read everything before commenting.

    --Henrik

Page 1 of 1 (12 items)