PSM_SHOWWIZBUTTONS message

Shows or hides buttons in a wizard. You can send this message explicitly or by using the PropSheet_ShowWizButtons macro.

Parameters

wParam

One or more of the following values that specify which property sheet buttons are to be shown. If a button value is included in both this parameter and lParam, it is shown.

Value Meaning
PSWIZB_BACK
The Back button.
PSWIZB_CANCEL
The Cancel button.
PSWIZB_DISABLEDFINISH
The Finish button.
PSWIZB_FINISH
The Finish button.
PSWIZB_NEXT
The Next button.
PSWIZB_SHOW
Set only this flag (defined as zero) to hide all buttons specified in lParam.
PSWIZB_RESTORE
Not implemented.

lParam

One or more of the same values used in wParam, specifying which buttons are affected by this call. If a button value appears in this parameter but not in wParam, the button is hidden.

Return value

No return value.

Remarks

Wizards display either three or four buttons below each page. This message is used to specify which buttons are visible. Wizards normally display Back, Cancel, and either a Next or Finish button. The Cancel button is always visible.

Typically, set PSWIZB_FINISH or PSWIZB_DISABLEDFINISH to replace 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 PROPSHEETHEADER structure when you create the wizard. Every page will then display all four buttons: Back, Next, Cancel, and Finish.

If you use the PropSheet_ShowWizButtons macro to send this message, it will be posted. At any other time, you can use SendMessage to send PSM_SHOWWIZBUTTONS.

If your notification handler uses PostMessage to send a PSM_SHOWWIZBUTTONS 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_SHOWWIZBUTTONS, the message box will receive focus. Since posted messages are not delivered until they reach the head of the message queue, the PSM_SHOWWIZBUTTONS 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.

Requirements

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