CButton::SetIcon

HICON SetIcon( HICON hIcon );

Return Value

The handle of an icon previously associated with the button.

Parameters

hIcon

The handle of an icon.

Remarks

Call this member function to associate a new icon with the button.

The icon will be automatically placed on the face of the button, centered by default.  If the icon is too large for the button, it will be clipped on either side. You can choose other alignment options, including the following:

Unlike CBitmapButton, which uses four bitmaps per button, SetIcon uses only one icon per the button. When the button is pressed, the icon appears to shift down and to the right.

CButton OverviewClass MembersHierarchy Chart

See Also   CButton::GetIcon, CBitmapButton::LoadBitmaps, Bitmaps