Compartilhar via


Adding Wizard Pages

This feature is introduced in MMC 1.1.

A wizard is a special type of property sheet. Wizards are designed to present pages one at a time in a sequence that is controlled by the application. Instead of selecting from a group of pages by clicking a tab, users move forward and backward through the sequence, one page at a time, by clicking the Next or Back button located at the bottom of the wizard.

MMC enables a snap-in to add either standard wizard pages or Wizard 97 pages. Wizard 97 pages have a different style than standard wizard pages. Be aware that snap-ins are strongly encouraged to use the Wizard 97 style for all wizards they create in order to have a consistent style throughout MMC.

For more information about wizard pages, see the Windows SDK on MSDN. The rest of the discussion focuses on adding wizard pages to a snap-in using the interfaces and other constructs provided in the MMC SDK.

The MMC interfaces used for adding wizard pages are the same as those used for adding property pages. The IPropertySheetProvider and IPropertySheetCallback interfaces are implemented by MMC and are used to create and maintain property sheet objects. The IExtendPropertySheet2 interface is implemented by the snap-in.

In order for MMC to create the property sheet with wizard controls (a wizard), the snap-in must directly call the IPropertySheetProvider interface and its CreatePropertySheet method. The snap-in can also specify in the method call that the wizard use the Wizard 97 style.

In addition to the CreatePropertySheet method, the IPropertySheetProvider interface includes the following methods:

  • FindPropertySheet determines whether a property sheet already exists for a particular scope or result item.
  • AddPrimaryPages collects pages from a primary snap-in.
  • AddExtensionPages collects pages from extension snap-ins.
  • Show displays a specific property sheet frame.

To define wizard pages with watermarks and header bitmaps, snap-ins must implement the IExtendPropertySheet2 interface. The CreatePropertyPages method defines the properties of one or more wizard pages using the PROPSHEETPAGE structure. The GetWatermarks method is used to specify the watermark and header bitmaps for the wizard. MMC calls the QueryPagesFor method to verify that a wizard page exists for a particular scope or result item when the user clicks the Properties context menu item.

Adding Wizard Pages: Interfaces

Adding Wizard Pages: Implementation Details

Adding Watermarks to Wizard 97 Pages

Using IPropertySheetProvider Directly

Adding Property Pages and Wizard Pages

Working with Extension Snap-ins