描述
定义属性表的框架和页.
FreeBASIC 语法
#ifdef __FB_64BIT__ TYPE PROPSHEETHEADERW dwSize as DWORD dwFlags as DWORD hwndParent as HWND hInstance as HINSTANCE UNION hIcon as HICON pszIcon as LPCWSTR END UNION pszCaption as LPCWSTR nPages as UINT UNION nStartPage as UINT pStartPage as LPCWSTR END UNION UNION ppsp as LPCPROPSHEETPAGEW phpage as HPROPSHEETPAGE ptr END UNION pfnCallback as PFNPROPSHEETCALLBACK UNION hbmWatermark as HBITMAP pszbmWatermark as LPCWSTR END UNION hplWatermark as HPALETTE UNION hbmHeader as HBITMAP pszbmHeader as LPCWSTR END UNION END TYPE #else TYPE PROPSHEETHEADERW field = 4 dwSize as DWORD dwFlags as DWORD hwndParent as HWND hInstance as HINSTANCE UNION field = 4 hIcon as HICON pszIcon as LPCWSTR END UNION pszCaption as LPCWSTR nPages as UINT UNION field = 4 nStartPage as UINT pStartPage as LPCWSTR END UNION UNION field = 4 ppsp as LPCPROPSHEETPAGEW phpage as HPROPSHEETPAGE ptr END UNION pfnCallback as PFNPROPSHEETCALLBACK UNION field = 4 hbmWatermark as HBITMAP pszbmWatermark as LPCWSTR END UNION hplWatermark as HPALETTE UNION field = 4 hbmHeader as HBITMAP pszbmHeader as LPCWSTR END UNION END TYPE #endif |
成员
dwSize
Size, in bytes, of this structure. The property sheet manager uses this member to determine which version of the PROPSHEETHEADER structure you are using. For more information, see the Remarks.
dwFlags
Flags that indicate which options to use when creating the property sheet page. This member can be a combination of the following values.
PSH_DEFAULT
Uses the default meaning for all structure members. This flag is not supported in conjunction with PSH_AEROWIZARD.
PSH_AEROWIZARD
Version 7.0. Creates a wizard property sheet that uses the newer Aero style. The PSH_WIZARD flag must also be set.
PSH_HASHELP
Permits property sheet pages to display a Help button. You must also set the PSP_HASHELP flag in the page's PROPSHEETPAGE structure when the page is created. If any of the initial property sheet pages enable a Help button, PSH_HASHELP will be set automatically. If none of the initial pages enable a Help button, you must explicitly set PSH_HASHELP if you want to have Help buttons on any pages that might be added later. This flag is not supported in conjunction with PSH_AEROWIZARD.
PSH_HEADER
Version 5.80 and later. Indicates that a header bitmap will be used with a Wizard97 wizard. You must also set the PSH_WIZARD97 flag. The header bitmap is obtained from the pszbmHeader member, unless the PSH_USEHBMHEADER flag is also set. In that case, the header bitmap is obtained from the hbmHeader member. This flag is not supported in conjunction with PSH_AEROWIZARD.
PSH_MODELESS
Causes the PropertySheet function to create the property sheet as a modeless dialog box instead of as a modal dialog box. When this flag is set, PropertySheet returns immediately after the dialog box is created, and the return value from PropertySheet is the window handle to the property sheet dialog box. This flag is not supported in conjunction with PSH_AEROWIZARD.
PSH_NOAPPLYNOW
Removes the Apply button. This flag is not supported in conjunction with PSH_AEROWIZARD.
PSH_NOCONTEXTHELP
Version 5.80 and later. Removes the context-sensitive Help button ("?"), which is usually present on the caption bar of property sheets. This flag is not valid for wizards. This flag is not supported in conjunction with PSH_AEROWIZARD.
PSH_PROPSHEETPAGE
Uses the ppsp member and ignores the phpage member when creating the pages for the property sheet.
PSH_PROPTITLE
Displays a title in the title bar of the property sheet. The title takes the appropriate form for the Microsoft Windows version. In more recent versions of Windows, the title is the string specified by the pszCaption followed by the string "Properties". In older versions of Windows, the title is the string "Properties for", followed by the string specified by the pszCaption member. This flag is not supported in conjunction with PSH_AEROWIZARD.
PSH_RESIZABLE
Allows the wizard to be resized by the user. Maximize and minimize buttons appear in the wizard's frame and the frame is sizable. To use this flag, you must also set PSH_AEROWIZARD.
PSH_RTLREADING
Reverses the direction in which pszCaption is displayed. Normal windows display all text, including pszCaption, left-to-right (LTR). For languages such as Hebrew or Arabic that read right-to-left (RTL), a window can be mirrored and all text will be displayed RTL. If PSP_RTLREADING is set, pszCaption will instead read RTL in a normal parent window and LTR in a mirrored parent window.
PSH_STRETCHWATERMARK
Stretches the watermark in Microsoft Internet Explorer 4.0-compatible Wizard97-style wizards. This flag is not supported in conjunction with PSH_AEROWIZARD.
Note This style flag is only included to provide backward compatibility for certain applications. Its use is not recommended, and it is only supported by common controls versions 4.0 and 4.01. With common controls version 5.80 and later, this flag is ignored.
PSH_USECALLBACK
Calls the function specified by the pfnCallback member when initializing the property sheet defined by this structure.
PSH_USEHBMHEADER
Version 5.80 or later. Obtains the header bitmap from the hbmHeader member instead of the pszbmHeader member. You must also set either the PSH_AEROWIZARD flag or the PSH_WIZARD97 flag together with the PSH_HEADER flag.
PSH_USEHBMWATERMARK
Version 5.80 or later. Obtains the watermark bitmap from the hbmWatermark member instead of the pszbmWatermark member. You must also set PSH_WIZARD97 and PSH_WATERMARK. This flag is not supported in conjunction with PSH_AEROWIZARD.
PSH_USEHICON
Uses hIcon as the small icon in the title bar of the property sheet dialog box.
PSH_USEHPLWATERMARK
Version 5.80 or later. Uses the HPALETTE structure pointed to by the hplWatermark member instead of the default palette to draw the watermark bitmap and/or header bitmap for a Wizard97 wizard. You must also set PSH_WIZARD97, and PSH_WATERMARK or PSH_HEADER. This flag is not supported in conjunction with PSH_AEROWIZARD.
PSH_USEICONID
Uses pszIcon as the name of the icon resource to load and use as the small icon in the title bar of the property sheet dialog box.
PSH_USEPAGELANG
Version 5.80 or later. Specifies that the language for the property sheet will be taken from the first page's resource. That page must be specified by resource identifier.
PSH_USEPSTARTPAGE
Uses the pStartPage member instead of the nStartPage member when displaying the initial page of the property sheet.
PSH_WATERMARK
Version 5.80 or later. Specifies that a watermark bitmap will be used with a Wizard97 wizard. You must also set the PSH_WIZARD97 flag. The watermark bitmap is obtained from the pszbmWatermark member, unless PSH_USEHBMWATERMARK is set. In that case, the header bitmap is obtained from the hbmWatermark member. This flag is not supported in conjunction with PSH_AEROWIZARD.
PSH_WIZARD
Creates a wizard property sheet. When using PSH_AEROWIZARD, you must also set this flag.
PSH_WIZARD97
Version 5.80 or later. Creates a Wizard97-style property sheet that allows a header and/or watermark bitmap to be displayed in the background. This flag is not supported in conjunction with PSH_AEROWIZARD.
PSH_WIZARDCONTEXTHELP
Adds a context-sensitive Help button ("?"), which is usually absent from the caption bar of a wizard. This flag is not valid for regular property sheets. This flag is not supported in conjunction with PSH_AEROWIZARD.
PSH_WIZARDHASFINISH
Always displays the Finish button on the wizard. You must also set either PSH_WIZARD, PSH_WIZARD97, or PSH_AEROWIZARD.
PSH_WIZARD_LITE
Version 5.80 or later. Uses the Wizard-lite style. This style is similar in appearance to PSH_WIZARD97, but it is implemented much like PSH_WIZARD. There are few restrictions on how the pages are formatted. For instance, there are no enforced borders, and the PSH_WIZARD_LITE style does not paint the watermark and header bitmaps for you the way Wizard97 does. This flag is not supported in conjunction with PSH_AEROWIZARD.
hwndParent
Handle to the property sheet's owner window.
hInstance
Handle to the instance from which to load the icon or title string resource. If the pszIcon or pszCaption member identifies a resource to load, this member must be specified.
hIcon
Handle to the icon to use as the small icon in the title bar of the property sheet dialog box. If the dwFlags member does not include PSH_USEHICON, this member is ignored. This member is declared as a union with pszIcon.
pszIcon
Icon resource to use as the small icon in the title bar of the property sheet dialog box. 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. If the dwFlags member does not include PSH_USEICONID, this member is ignored. This member is declared as a union with hIcon.
pszCaption
Title of the property sheet dialog box. This member can specify either the identifier of a string resource or the address of a string that specifies the title. If the dwFlags member includes PSH_PROPTITLE, the string "Properties for" is inserted at the beginning of the title. This field is ignored for wizards.
nPages
Number of elements in the phpage array.
nStartPage
Zero-based index of the initial page that appears when the property sheet dialog box is created. This member is declared as a union with pStartPage.
pStartPage
Name of the initial page that appears when the property sheet dialog box is created. This member can specify either the identifier of a string resource or the address of a string that specifies the name. This member is declared as a union with nStartPage.
ppsp
Pointer to an array of PROPSHEETPAGE structures that define the pages in the property sheet. If the dwFlags member does not include PSH_PROPSHEETPAGE, this member is ignored. Note that the PROPSHEETPAGE structure is variable in size. Applications that parse the array pointed to by ppsp must take the size of each page into account. This member is declared as a union with phpage.
phPage
Pointer to an array of handles to the property sheet pages. Each handle must have been created by a previous call to the CreatePropertySheetPage function. If the dwFlags member includes PSH_PROPSHEETPAGE, phpage is ignored and should be set to NULL. When the PropertySheet function returns, any HPROPSHEETPAGE handles in the phpage array will have been destroyed. This member is declared as a union with ppsp.
pfnCallback
Pointer to an application-defined callback function that is called when the property sheet is initialized. For more information about the callback function, see the description of the PropSheetProc function. If the dwFlags member does not include PSH_USECALLBACK, this member is ignored.
hbmWatermark
Version 5.80 or later. Handle to the watermark bitmap. If the dwFlags member does not include PSH_USEHBMWATERMARK, this member is ignored.
pszbmWatermark
Version 5.80 or later. Bitmap resource to use as the watermark. This member can specify either the identifier of the bitmap resource or the address of the string that specifies the name of the bitmap resource. If the dwFlags member includes PSH_USEHBMWATERMARK, this member is ignored.
hplWatermark
Version 5.80 or later. HPALETTE structure used for drawing the watermark bitmap and/or header bitmap. If the dwFlags member does not include PSH_USEHPLWATERMARK, this member is ignored.
hbmHeader
Version 5.80 or later. Handle to the header bitmap. If the dwFlags member does not include PSH_USEHBMHEADER, this member is ignored.
pszbmHeader
Version 5.80 or later. Bitmap resource to use as the header. This member can specify either the identifier of the bitmap resource or the address of the string that specifies the name of the bitmap resource. If the dwFlags member includes PSH_USEHBMHEADER, this member is ignored.
备注
如果用户选择一个设置,如大字体,扩大了对话框,水印的开始和结束页面上绘制将扩大以及.原始位图的大小和位置将保持不变.附加区域将填充位图左上角的像素的颜色.
请注意,这种结构的几个成员只支持COMCTL32.DLL版本4.71后来.
但是,必须以其大小初始化结构.如果你使用当前定义的结构尺寸,应用程序可能无法运行在comctl32.dll较早的版本中,它期待一个较小的结构.这包括所有的系统与Windows 95或微软Windows NT 4.0没有Internet Explorer 4.0或以后安装.你可以通过定义适当的版本上运行的应用程序pre-4.71 comctl32.dll版本.但是,如果应用程序还需要在具有更近版本的系统上运行,这可能会导致问题.
你可以利用目前的头文件和设置的PROPSHEETHEADER结构尺寸适当所有COMCTL32.DLL版本保持兼容.在你初始化结构,使用DllGetVersion函数来确定安装在系统上是COMCTL32.DLL版.如果是4.71或更高版本,使用
psh.dwSize = SIZEOF(PROPSHEETHEADER)
dwSize成员初始化.对于较早的版本,pre-4.71结构的大小是由PROPSHEETHEADER_V1_SIZE常数.使用
psh.dwSize = %PROPSHEETHEADER_V1_SIZE
四向导风格,PSH_WIZARD, PSH_WIZARD97, PSH_WIZARD_LITE,和PSH_AEROWIZARD是互不相容的.只有一个样式标志应该被设置.
转换一个老向导的Aero风格的向导,用下面的替换现有的向导旗(PSH_WIZARD, PSH_WIZARD97,或PSH_WIZARD_LITE).
%PSH_WIZARD OR %PSH_AEROWIZARD
重建向导后,将以新样式出现.
引用文件
Prsht.bi