PROPSHEETPAGE Structure

来源:互联网 发布:ubuntu挂载硬盘到data 编辑:程序博客网 时间:2024/05/01 01:44

Defines a page in a property sheet.

Syntax

typedef struct _PROPSHEETPAGE {    DWORD dwSize;    DWORD dwFlags;    HINSTANCE hInstance;    union {        LPCSTR pszTemplate;        LPCDLGTEMPLATE pResource;        };    union {        HICON hIcon;        LPCSTR pszIcon;        };    LPCSTR pszTitle;    DLGPROC pfnDlgProc;    LPARAM lParam;    LPFNPSPCALLBACK pfnCallback;    UINT *pcRefParent;#if (_WIN32_IE >= 0x0500)    LPCTSTR pszHeaderTitle;    LPCTSTR pszHeaderSubTitle;#endif#if (_WIN32_WINNT >= 0x0501)    HANDLE hActCtx;#endif} PROPSHEETPAGE, *LPPROPSHEETPAGE;

Members

dwSize
Size, in bytes, of this structure. The property sheet manager uses this member to determine which version of thePROPSHEETHEADER structure you are using.
dwFlags
Flags that indicate which options to use when creating the property sheet page. This member can be a combination of the following values.
PSP_DEFAULT
Uses the default meaning for all structure members. This flag is not supported when using the Aero-style wizard (PSH_AEROWIZARD).
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 that is in memory is not write-protected. A read-only template will cause an exception in some versions of Microsoft Windows.
PSP_HASHELP
Enables the property sheet Help button when the page is active. This flag is not supported when using the Aero-style wizard (PSH_AEROWIZARD).
PSP_HIDEHEADER
Version 5.80 and later. Causes the wizard property sheet to hide the header area when the page is selected. If a watermark has been provided, it will be painted on the left side of the page. This flag should be set for welcome and completion pages, and omitted for interior pages. This flag is not supported when using the Aero-style wizard (PSH_AEROWIZARD).
PSP_PREMATURE
Version 4.71 or later. Causes the page to be created when the property sheet is created. If this flag is not specified, the page will not be created until it is selected the first time. This flag is not supported when using the Aero-style wizard (PSH_AEROWIZARD).
PSP_RTLREADING
Reverses the direction in which pszTitle is displayed. Normal windows display all text, includingpszTitle, left-to-right (LTR). For languages such as Hebrew or Arabic that read right-to-left (RTL), a window can bemirrored and all text will be displayed RTL. If PSP_RTLREADING is set, pszTitle will instead read RTL in a normal parent window, and LTR in a mirrored parent window.
PSP_USECALLBACK
Calls the function specified by the pfnCallback member when creating or destroying the property sheet page defined by this structure.
PSP_USEFUSIONCONTEXT
Version 6.0 and later. Use an activation context. To use an activation context, you must set this flag and assign the activation context handle tohActCtx. See the Remarks.
PSP_USEHEADERSUBTITLE
Version 5.80 or later. Displays the string pointed to by thepszHeaderSubTitle member as the subtitle of the header area of a Wizard97 page. To use this flag, you must also set the PSH_WIZARD97 flag in thedwFlags member of the associatedPROPSHEETHEADER structure. The PSP_USEHEADERSUBTITLE flag is ignored if PSP_HIDEHEADER is set. This flag is not supported when using the Aero-style wizard (PSH_AEROWIZARD).
PSP_USEHEADERTITLE
Version 5.80 or later. Displays the string pointed to by thepszHeaderSubTitle member as the title in the header of a Wizard97 interior page. You must also set the PSH_WIZARD97 flag in thedwFlags member of the associatedPROPSHEETHEADER structure. The PSP_USEHEADERTITLE flag is ignored if PSP_HIDEHEADER is set.
PSP_USEHICON
Uses hIcon as the small icon on the tab for the page. This flag is not supported when using the Aero-style wizard (PSH_AEROWIZARD).
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. This flag is not supported when using the Aero-style wizard (PSH_AEROWIZARD).
PSP_USEREFPARENT
Maintains the reference count specified by the pcRefParent member for the lifetime of the property sheet page created from this structure.
PSP_USETITLE
Uses the pszTitle member as the title of the property sheet dialog box instead of the title stored in the dialog box template. This flag is not supported when using the Aero-style wizard (PSH_AEROWIZARD).
hInstance
Handle to the instance from which to load an icon or string resource. If the pszIcon, pszTitle,pszHeaderTitle, or pszHeaderSubTitle member identifies a resource to load,hInstance must be specified.
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 the PSP_DLGINDIRECT flag in thedwFlags member is set, pszTemplate is ignored. This member is declared as a union withpResource.
pResource
Pointer to a dialog box template in memory. The PropertySheet function assumes that the template is not write-protected. A read-only template will cause an exception in some versions of Windows. To use this member, you must set the PSP_DLGINDIRECT flag in the dwFlags member. This member is declared as a union withpszTemplate.
hIcon
Handle to the icon to use as the icon in the tab of the page. If the dwFlags member does not include PSP_USEHICON, this member is ignored. This member is declared as a union withpszIcon.
pszIcon
Icon resource to use as the icon in the tab of the page. This member can specify either the identifier of the icon resource or the address of the string that specifies the name of the icon resource. To use this member, you must set the PSP_USEICONID flag in the dwFlags member. This member is declared as a union withpszIcon.
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 address of a string that specifies the title. To use this member, you must set the PSP_USETITLE flag in the dwFlags member.
pfnDlgProc
Pointer to the dialog box procedure for the page. Because the pages are created as modeless dialog boxes, the dialog box procedure must not call theEndDialog function.
lParam
When the page is created, a copy of the page's PROPSHEETPAGE structure is passed to the dialog box procedure with aWM_INITDIALOG message. The lParam member is provided to allow you to pass application-specific information to the dialog box procedure. It has no effect on the page itself. For more information, seeProperty Sheet Creation.
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, seePropSheetPageProc. To use this member, you must set the PSP_USECALLBACK flag in thedwFlags member.
pcRefParent
Pointer to the reference count value. To use this member, you must set the PSP_USEREFPARENT flag in thedwFlags member.

Note   When a property sheet page is created, the value pointed to bypcRefParent is incremented. You create a property sheet page implicitly by setting the PSH_PROPSHEETPAGE flag in thedwFlags member of PROPSHEETHEADER and calling thePropertySheet function. You can do it explicitly by using the CreatePropertySheetPage function. When a property sheet page is destroyed, the value pointed to by thepcRefParent member is decremented. This takes place automatically when the property sheet is destroyed. You can explicitly destroy a property sheet page by using theDestroyPropertySheetPage function.
pszHeaderTitle
Version 5.80 or later. Title of the header area. To use this member under the Wizard97-style wizard, you must also do the following:
  • Set the PSP_USEHEADERTITLE flag in the dwFlags member.
  • Set the PSH_WIZARD97 flag in the dwFlags member of the page'sPROPSHEETHEADER structure.
  • Make sure that the PSP_HIDEHEADER flag in the dwFlags member is not set.
pszHeaderSubTitle
Version 5.80. Subtitle of the header area. To use this member, you must do the following:
  • Set the PSP_USEHEADERSUBTITLE flag in the dwFlags member.
  • Set the PSH_WIZARD97 flag in the dwFlags member of the page'sPROPSHEETHEADER structure.
  • Make sure that the PSP_HIDEHEADER flag in the dwFlags member is not set.
Note  This member is ignored when using the Aero-style wizard (PSH_AEROWIZARD).
hActCtx
Version 6.0 or later. An activation context handle. Set this member to the handle that is returned when you create the activation context withCreateActCtx. The system will activate this context before creating the dialog box. You do not need to use this member if you use a global manifest. See the Remarks.
原创粉丝点击