typedef struct _DLGPAGE { WORD cbSize; WORD Flags; DLGPROC DlgProc; LPTSTR pTabName; DWORD IconID; union { WORD DlgTemplateID; HANDLE hDlgTemplate; }; } DLGPAGE, *PDLGPAGE;
The DLGPAGE structure describes the non-treeview property sheet page characteristics.
Flag |
Description |
DPF_ICONID_AS_HICON |
IconID is a handle to an icon rather than an icon resource ID. |
DPF_USE_HDLGTEMPLATE |
The CPSUI should use the hDlgTemplate union member. |
Value |
Description |
DP_STD_TREEVIEWPAGE |
This page is a standard treeview page provided by the CPSUI. The CPSUI treeview page displays all valid OPTITEMs as a tree, and allows the user to modify valid selectable OPTITEMs on the page. |
DP_STD_DOCPROPPAGE |
This page is the standard Document Properties page provided by the CPSUI. |
User-defined values must not conflict with system-supplied ones.
If DlgProc is not null and DlgTemplateID is not DP_STD_Xxx, the CPSUI processes messages as shown in the following table.
Message |
Description |
WM_INITDIALOG |
The CPSUI initializes the dialog box and then calls the function to which DlgProc points with the WM_INITDIALOG message. The DlgProc function should return the behavior expected for this message; see the Win32 SDK for details. The lParam member of WM_INITDIALOG is a pointer to a Win32 PROPSHEETPAGE structure. The lParam field of the PROPSHEETPAGE structure is the UserData field of the COMPROPSHEETUI structure. To access the PSPINFO structure associated with this property sheet page, the caller’s DlgProc function should use the CPSUI-defined PPSPINFO_FROM_WM_INITDIALOG_LPARAM(lParam) macro, where lParam is the parameter passed to the WM_INITDIALOG message. The caller’s subclass function should save the pointer to the PSPINFO structure for later use. It must not modify the contents of the PSPINFO structure. |
All Other Dialog Messages |
If the value returned by the DlgProc function is non-zero, the CPSUI assumes that the DlgProc function has processed the message entirely. If the value returned is zero, the CPSUI processes the message. |
Each OPTITEM corresponds to one input control with one extended check box or extended push button. Because the CPSUI automatically disables and removes from the property sheet those items with the OPTIF_HIDE flag set, and dynamically moves the remaining controls, the following tips for designing the dialog box controls should be followed: