Icon Control

[This is preliminary documentation and subject to change.]

This control simply displays a static picture of an icon. The background of the image is transparent.

An icon file can contain different size images of the same icon. If the IconSize bits are set, the first image of the specified size is loaded. If no size is specified, the first image is loaded.

If the IconSize bits are not set the FixedSize bit is ignored and the image is stretched to fit the control rectangle.

If both the IconSize bits and the FixedSize bit are set and the control is larger than the icon, the image is centered in the control. If the image is larger than the control it is not chopped (unlike in the Bitmap control) but shrunk to fit the control.

Property

There can be no property associated with this control.

Valid Style Bits

FixedSize
IconSize
ImageHandle
Visible

Valid Control Attributes

Default
Image
ImageHandle
Position
Text
Visible
WindowHandle

Control Events Published

None.

Can Take Focus

No.

No.

Remarks

This control is created as a "STATIC" with the SS_ICON, SS_CENTERIMAGE, WS_CHILD, and WS_GROUP styles.