Used by modeless property sheets to retrieve the information returned to modal property sheets by PropertySheet. You can send this message explicitly or use the PropSheet_GetResult macro.



Must be zero.


Must be zero.

Return value

Returns a positive value if successful, or -1 otherwise. The following return values have a special meaning.

Return codeDescription

A page sent a PSM_REBOOTSYSTEM message to the property sheet. The computer must be restarted for the user's changes to take effect.


A page sent a PSM_RESTARTWINDOWS message to the property sheet. Windows must be restarted for the user's changes to take effect.



To retrieve extended error information, call GetLastError.

The return value for this message is identical to what PropertySheet returns for a modal property sheet.

Version 5.80. The PropertySheet return value carries different information for modal and modeless property sheets. In some cases, modeless property sheets may need the information they would have received from PropertySheet if they had been modal. In particular, they may need to know whether ID_PSREBOOTSYSTEM or ID_PSRESTARTWINDOWS would have been returned.

For a modeless property sheet, your message loop should use PSM_ISDIALOGMESSAGE to pass messages to the property sheet dialog box, and PSM_GETCURRENTPAGEHWND to determine when to destroy the dialog box. When the user clicks the OK or Cancel button, PSM_GETCURRENTPAGEHWND returns NULL. You can then retrieve the value that a modal property sheet would have received from PropertySheet by sending a PSM_GETRESULT message.

Note  This message is not supported when using the Aero wizard style (PSH_AEROWIZARD).


Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]