CStatic::SetIcon

HICON SetIcon( HICON hIcon );

Return Value

The handle of the icon previously associated with the static control, or NULL if no icon was associated with the static control.

Parameters

hIcon

Handle of the icon to be drawn in the static control.

Remarks

Call this member function to associate a new icon image with the static control.

The icon will be automatically drawn in the static control. By default, it will be drawn in the upper-left corner and the static control will be resized to the size of the icon.

You can use various window and static control styles, including the following:

CStatic OverviewClass MembersHierarchy Chart

See Also   CStatic::GetIcon, STM_SETICON, Icons