typedef struct _INSERTPSUIPAGE_INFO {
WORD cbSize;
BYTE Type;
BYTE Mode;
DWORD dwData1;
DWORD dwData2;
DWORD dwData3;
} INSERTPSUIPAGE_INFO, *PINSERTPSUIPAGE_INFO;
The INSERTPSUIPAGE_INFO structure contains the information required by the CPSUI to insert a property sheet page.
Members
cbSize
Size in bytes of this structure.
Type
Specifies the type of property sheet page(s) to be inserted by the CPSUI. This field can be one of the following values.
Value | Description |
PSUIPAGEINSERT_ GROUP_PARENT |
Inserts a new group parent under which child pages can be inserted. This type allows a set of pages to be grouped such that the CPSUI can delete the entire set through the parent, rather than having to individually delete each child page. The handle returned by the PFNCOMPROPSHEET function with a CPSFUNC_INSERT_PSUIPAGE function and this type can be nested. That is, the returned handle can be passed in the hComPropSheet parameter to the CPSUI’s callback as the parent handle such that the new page is inserted at the level below the returned group parent handle. The dwData1, dwData2, and dwData3 fields must all be set to zero. |
PSUIPAGEINSERT_ PCOMPROPSHEETUI |
Insert pages using the data supplied in a COMPROPSHEETUI structure. The dwData1 field is a pointer to the COMPROPSHEETUI structure; dwData2 and dwData3 must be set to zero. The CPSUI returns the total number of added pages in dwData2 when it succeeds, or ERR_CPSUI_Xxx if it fails. |
PSUIPAGEINSERT_ PFNPROPSHEETUI |
Insert pages using the PFNPROPSHEETUI function. The CPSUI calls this function with the Reason field of the pPSUIInfo parameter set to PROPSHEETUI_REASON_INIT to have it add the pages. The PFNPROPSHEETUI function pointer is specified by dwData1, and dwData2 is passed to this function as the lParam parameter. The dwData3 field must be set to zero. |
PSUIPAGEINSERT_ PROPSHEETPAGE |
Insert pages using a PROPSHEETPAGE structure. The dwData1 field is a pointer to the PROPSHEETPAGE structure; dwData2 and dwData3 must be set to zero. |
PSUIPAGEINSERT_ HPROPSHEETPAGE |
Insert pages using an HPROPSHEETPAGE handle. The dwData1 field contains the handle returned from a call to the Win32 CreatePropertySheetPage function; dwData2 and dwData3 must be set to zero. |
PSUIPAGEINSERT_DLL | Insert pages from a dynamic link library. The CPSUI loads the DLL, gets the procedure address of the PFNPROPSHEETUI function, and calls this function with the Reason field of the pPSUIInfo parameter set to PROPSHEETUI_REASON_INIT. The dwData1 field is a pointer to the null-terminated string that specifies the name of the DLL. The dwData2 field is a pointer to the null-terminated ANSI string that specifies the name of the PFNPROPSHEETUI function to call to do the insertion. The dwData3 field is passed to the DLL-loaded function as the lParam parameter. This method of inserting pages guarantees that the DLL is unloaded correctly. |
Mode
Specifies how the CPSUI should insert the pages. This field can be one of the following values.
Mode | Description |
INSPSUIPAGE_ MODE_BEFORE |
Inserts the page(s) before the CPSUI object handle identified by the lParam1 parameter to the PFNCOMPROPSHEET callback. |
INSPSUIPAGE_ MODE_AFTER |
Inserts the page(s) after the CPSUI object handle identified by the lParam1 parameter to the PFNCOMPROPSHEET callback. |
INSPSUIPAGE_ MODE_FIRST_CHILD |
Inserts the page(s) as the first child of the parent handle identified by hComPropSheet. The CPSUI ignores the lParam1 parameter sent to its PFNCOMPROPSHEET callback. |
INSPSUIPAGE_ MODE_LAST_CHILD |
Inserts the page(s) as the last child of the parent handle identified by hComPropSheet. The CPSUI ignores the lParam1 parameter sent to its PFNCOMPROPSHEET callback. |
INSPUIPAGE_ MODE_INDEX |
Inserts the page(s) as a zero-based child index of the parent handle identified by hComPropSheet. The lParam1 parameter to the PFNCOMPROPSHEET callback specifies the handle to the zero-based index. This handle must be generated by using the CPSUI-defined HINSPSUIPAGE_INDEX(Index) macro. If the index is greater than or equal to the number of children, the CPSUI uses INSPSUIPAGE_MODE_LAST_CHILD as the mode. |
dwData1
dwData2
dwData3
32-bit data fields whose interpretations depend on Type. See the Type member’s description for details.
Comments
The original caller initializes an INSERTPSUIPAGE_INFO structure and passes it to the CPSUI’s PFNCOMPROPSHEET callback as lParam2 when the function index is CPSFUNC_INSERT_PSUIPAGE. The CPSUI adds the specified pages at the position specified by Mode.