PSM_SETWIZBUTTONS message

Enables or disables the Back, Next, and Finish buttons in a wizard. You can also use the PropSheet_SetWizButtons macro to post the message.

Parameters

wParam

Set this parameter to PSWIZBF_ELEVATIONREQUIRED to display the elevated icon on the buttons specified in lParam. The elevated icon (or UAC shield icon) indicates that the elevation prompt will be used to prompt the user for approval or credentials. For more information, see Designing UAC Applications for Windows Vista.

Note

Displaying the UAC shield icon is only supported in AeroWizards (PSH_AEROWIZARD).

lParam

Value that specifies which property sheet buttons are enabled. You can combine one or more of the following flags.

Value Meaning
PSWIZB_BACK
Enables the Back button. If this flag is not set, the Back button is displayed as disabled.
PSWIZB_DISABLEDFINISH
Displays a disabled Finish button.
PSWIZB_FINISH
Displays an enabled Finish button.
PSWIZB_NEXT
Enables the Next button. If this flag is not set, the Next button is displayed as disabled.

Return value

No return value.

Remarks

If your notification handler uses PostMessage to send a PSM_SETWIZBUTTONS message, do nothing that will affect window focus until after the handler returns. For example, if you call MessageBox immediately after using PostMessage to send PSM_SETWIZBUTTONS, the message box will receive focus. Since posted messages are not delivered until they reach the head of the message queue, the PSM_SETWIZBUTTONS message will not be delivered until after the wizard has lost focus to the message box. As a result, the property sheet will not be able to properly set the focus for the buttons.

If you send the PSM_SETWIZBUTTONS message during your handling of the PSN_SETACTIVE notification, use the PostMessage function rather than the SendMessage function. Otherwise, the system will not update the buttons properly. If you use the PropSheet_SetWizButtons macro to send this message, it will be posted. At any other time, you can use SendMessage to send PSM_SETWIZBUTTONS.

Wizards display either three or four buttons below each page. This message is used to specify which buttons are enabled. Wizards normally display Back, Cancel, and either a Next or Finish button. You typically enable only the Next button for the welcome page, Next and Back for interior pages, and Back and Finish for the completion page. The Cancel button is always enabled. Normally, setting PSWIZB_FINISH or PSWIZB_DISABLEDFINISH replaces the Next button with a Finish button. To display Next and Finish buttons simultaneously, set the PSH_WIZARDHASFINISH flag in the dwFlags member of the wizard's PROPSHEETHEADER structure when you create the wizard. Every page will then display all four buttons.

Requirements

Requirement Value
Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2003 [desktop apps only]
Header
Prsht.h