Microsoft Windows CE 3.0  

PropertySheet

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

This function creates a property sheet and adds the pages defined in the specified property sheet header structure.

int
PropertySheet(
LPCPROPSHEETHEADER
lppsph
);

Parameters

lppsph
[in] Long pointer to a PROPSHEETHEADERstructure that defines the frame and pages of a property sheet.

Return Values

A positive value indicates success. –1 indicates failure.

If the dwFlagsmember of the PROPSHEETHEADERstructure specifies the PSH_MODELESS flag, the successful return value is the window handle to the property sheet dialog.

The return values described in the following table have a special meaning.

Value Description
ID_PSREBOOTSYSTEM A page sent the PSM_REBOOTSYSTEMmessage to the property sheet. The computer must be restarted for the user's changes to take effect.
ID_PSRESTARTWINDOWS A page sent the PSM_RESTARTWINDOWSmessage to the property sheet. Windows must be restarted for the user's changes to take effect.

To get extended error information, call GetLastError.

Remarks

By default, PropertySheetcreates a modal dialog. If the dwFlagsmember of the PROPSHEETHEADERstructure specifies the PSH_MODELESS flag, PropertySheetcreates a modeless dialog and returns immediately after the dialog is created. In this case, the PropertySheetreturn value is the window handle to the modeless dialog.

For a modeless property sheet, your message loop should use PSM_ISDIALOGMESSAGEto pass messages to the property sheet dialog. Your message loop should use PSM_GETCURRENTPAGEHWND to determine when to destroy the dialog. When the user chooses the OKor Cancelbutton, PSM_GETCURRENTPAGEHWNDreturns NULL, and you can then use the DestroyWindowfunction to destroy the dialog box.

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 1.0 and later Prsht.h    
Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

DestroyWindow, GetLastError, PSM_ISDIALOGMESSAGE, PSM_REBOOTSYSTEM, PSM_RESTARTWINDOWS, PSM_GETCURRENTPAGEHWND, PROPSHEETHEADER