PROPSHEETPAGE

The PROPSHEETPAGE structure defines a page in a property sheet.

typedef struct _PROPSHEETPAGE { // psp

DWORD dwSize;

DWORD dwFlags;

HINSTANCE hInstance;

union {

LPCTSTR pszTemplate;

LPCDLGTEMPLATE pResource;

};

union {

HICON hIcon;

LPCTSTR pszIcon;

};

LPCTSTR pszTitle;

DLGPROC pfnDlgProc;

LPARAM lParam;

LPFNPSPCALLBACK pfnCallback;

UINT FAR * pcRefParent;

} PROPSHEETPAGE, FAR *LPPROPSHEETPAGE;

typedef const PROPSHEETPAGE FAR *LPCPROPSHEETPAGE;

Members

dwSize

Size, in bytes, of the structure. The size includes any extra application-defined data at the end of the structure.

dwFlags

A set of bit flags that enable optional attributes of the property sheet page, and indicate the valid members of the PROPSHEETPAGE structure. This member can be a combination of the following values.

Value Meaning
PSP_DEFAULT Uses the default meaning for all structure members.
PSP_DLGINDIRECT Creates the page from the dialog box template in memory pointed to by the pResource member. The PropertySheet function assumes that the template is in writeable memory; a read-only template will cause an exception on some versions of Windows.

If this flag is not set, the page loads the dialog box template from the resource identified by the pszTemplate member.

PSP_HASHELP Enables the property sheet Help button when this page is active.
PSP_USECALLBACK Calls the function specified by pfnCallback when creating or destroying the property sheet page defined by this structure.
PSP_USEHICON Uses hIcon as the small icon on the tab for the page.
PSP_USEICONID Uses pszIcon as the name of the icon resource to load and use as the small icon on the tab for the page.
PSP_USEREFPARENT Maintains the reference count specified by pcRefParent for the lifetime of the property sheet page created from this structure.
PSP_USETITLE Uses pszTitle as the title of the property sheet dialog box instead of the title stored in the dialog box template.
PSP_RTLREADING When this page is active, displays the text of pszTitle using right-to-left reading order on Hebrew or Arabic systems.

hInstance

Handle to the instance from which to load the dialog box template, icon, or title string resource.

pszTemplate

Dialog box template to use to create the page. This member can specify either the resource identifier of the template or the address of a string that specifies the name of the template. If dwFlags includes the PSP_DLGINDIRECT value, this member is ignored.

pResource

Pointer to a dialog box template in memory. The PropertySheet function assumes that the template is in writeable memory; a read-only template will cause an exception on some versions of Windows. If dwFlags does not include the PSP_DLGINDIRECT value, this member is ignored.

hIcon

Handle to the icon to use as the small icon in the tab for the page. If dwFlags does not include the PSP_USEHICON value, this member is ignored.

pszIcon

Icon resource to use as the small icon in the tab for the page. This member can specify either the identifier of the icon resource or the pointer to the string that specifies the name of the icon resource. If dwFlags does not include the PSP_USEICONID value, this member is ignored.

pszTitle

Title of the property sheet dialog box. This title overrides the title specified in the dialog box template. This member can specify either the identifier of a string resource or the pointer to a string that specifies the title. If dwFlags does not include the PSP_USETITLE value, this member is ignored.

pfnDlgProc

Pointer to the dialog box procedure for the page. The dialog box procedure must not call the EndDialog function.

lParam

Application-defined data.

pfnCallback

Pointer to an application-defined callback function that is called when the page is created and when it is about to be destroyed. For more information about the callback function, see PropSheetPageProc. If dwFlags does not include the PSP_USECALLBACK value, this member is ignored.

pcRefParent

Pointer to the reference count value. If dwFlags does not include the PSP_USERREFPARENT value, this member is ignored.

Remarks

When the PropertySheet function creates the page, the dialog box procedure for the page receives a WM_INITDIALOG message. The lParam parameter of this message points to the PROPSHEETPAGE structure used to create the page.

See Also

EndDialog, PropSheetPageProc, PropertySheet, WM_INITDIALOG