Compartir a través de


PropertySheet

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

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

Syntax

int PropertySheet(
  LPCPROPSHEETHEADER lppsph 
);

Parameters

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

Return Value

A positive value indicates success. –1 indicates failure.

If the dwFlags member of the PROPSHEETHEADER structure 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_REBOOTSYSTEM message to the property sheet. The computer must be restarted for the user's changes to take effect.

ID_PSRESTARTWINDOWS

A page sent the PSM_RESTARTWINDOWS message 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, PropertySheet creates a modal dialog. If the dwFlags member of the PROPSHEETHEADER structure specifies the PSH_MODELESS flag, PropertySheet creates a modeless dialog and returns immediately after the dialog is created. In this case, the PropertySheet return value is the window handle to the modeless dialog.

For a modeless property sheet, your message loop should use PSM_ISDIALOGMESSAGE to 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 OK or Cancel button, PSM_GETCURRENTPAGEHWND returns NULL, and you can then use the DestroyWindow function to destroy the dialog box.

Requirements

Header prsht.h
Windows Embedded CE Windows CE 1.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

DestroyWindow
CreatePropertySheetPage
DestroyPropertySheetPage
PSM_ISDIALOGMESSAGE
PSM_REBOOTSYSTEM
PSM_RESTARTWINDOWS
PSM_GETCURRENTPAGEHWND
PROPSHEETHEADER