Jump to content

SM SETHANDLE

From EDM2

This message sets the icon or bit-map handle of a static control.

Syntax

param1
HBITMAP hbmHandle;   /* Icon or bit-map handle of a static control. */

param2
ULONG ulReserved;    /* Reserved value, should be 0. */

Parameters

hbmHandle (HBITMAP) - Input/Output
Icon or bit-map handle of a static control. This is an icon handle when sent to a control with a style of SS_ICON or SS_SYSICON, and a bit-map handle when sent to a control with a style of SS_BITMAP.
ulReserved (ULONG) - Input
Reserved value, should be 0.

Returns

hbmHandle (HBITMAP) - returns
Icon or bit-map handle of the static control.
NULLHANDLE: No icon or bit-map handle of the static control exists, or an error occurred.
Other: Icon or bit-map handle of the static control.

Remarks

The static control window procedure responds to this message by setting the icon or bit-map handle of a static control to the value specified by hbmHandle and causes the static control to be redrawn, using the new item handle.

It should only be sent to a control with a style of SS_BITMAP, SS_ICON, or SS_SYSICON.

Default Processing

The default window procedure does not expect to receive this message and therefore takes no action on it other than to set hbmHandle to the default value of NULLHANDLE.