CPSFUNC_GET_PFNPROPSHEETUI_ICON function

The CPSFUNC_GET_PFNPROPSHEETUI_ICON function code causes the ComPropSheet function to return a handle to the icon that is associated with a set of property sheet pages. The set of pages must have been previously created by a PFNPROPSHEETUI-typed function.

Syntax

LONG_PTR ComPropSheet(
   HANDLE hComPropSheet,
   UINT   Function,
   LPARAM lParam1,
   LPARAM lParam2
);

Parameters

  • hComPropSheet
    Group parent handle.

  • Function
    Caller sets this function code parameter to CPSFUNC_GET_PFNPROPSHEETUI_ICON when it calls ComPropSheet to retrieve a handle to the icon that is associated with a set of property sheet pages.

  • lParam1
    CPSUI handle that refers to a set of property sheet pages. This handle must previously have been obtained by a call to ComPropSheet with the CPSFUNC_ADD_PFNPROPSHEETUI function code.

  • lParam2
    Specifies two WORD-sized values representing the icon's size, in pixels. The LOWORD value is the width, and the HIWORD value is the height. If these values are zero, the system metrics SM_CXICON and SM_CYICON are used. (See GetSystemMetrics in the Microsoft Windows SDK documentation.)

Return value

If the operation succeeds, the ComPropSheet function returns an icon handle; otherwise it returns NULL.

Remarks

The ComPropSheet function calls the PFNPROPSHEETUI-typed function associated with the specified page handle, and passes a reason value of PROPSHEETUI_REASON_GET_ICON. The PFNPROPSHEETUI-typed function then calls LoadImage (described in the Windows SDK documentation) and provides the icon size specified bylParam2 to load an icon resource.

Requirements

Target platform

Desktop

Header

Compstui.h (include Compstui.h)

See also

CPSFUNC_ADD_PFNPROPSHEETUI

PFNPROPSHEETUI

 

 

Send comments about this topic to Microsoft