Resource Compiler - ICON Statement (Control)

Syntax

ICON icon-id, id, x, y, width, height,[style]

This form of the ICON statement creates an icon control. This control is an icon displayed in a dialog box. The ICON statement, which you can use only in a DIALOG or WINDOW statement, defines the icon-resource identifier, icon-control identifier, position, and attributes of a control window. The predefined class for this control is WC_ STATIC. If you do not specify a style, the default style is SS_ ICON. For the ICON statement, the width and height fields are ignored; the icon automatically sizes itself.

icon-id 
Specifies the resource identifier of an icon that is defined elsewhere in the resource file.
id
Specifies the control identifier. This value must be a signed integer in the range -32768 through 32767, an unsigned integer in the range of 1 through 65535, or a simple expression that evaluates to a value in these ranges.
x
Specifies the x-coordinate of the lower-left corner of the control. This value must be a signed integer in the range -32768 through 32767 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The coordinate is assumed to be in dialog units and is relative to the origin of the dialog box, window, or control containing the specified control.
y
Specifies the y-coordinate of the lower-left corner of the control. This value must be a signed integer in the range -32768 through 32767 or an expression consisting of integers and the addition (+) or subtraction (-) operator. The coordinate is assumed to be in dialog units and is relative to the origin of the dialog box, window, or control containing the specified control.
width
Specifies a reserved value. Can be set to zero.
height
Specifies a reserved value. Can be set to zero.
style
Specifies the control styles. This value can be a combination of the styles specified for WC_STATIC. You can use the bitwise OR (|) operator to combine styles.

Example
This example creates an icon control whose icon identifier is 99.

ICON 99, 101, 10, 10, 0, 0


Resource Compiler - ICON Statement (Resource)
Resource Compiler - DEFAULTICON Statement
Resource Script Files
Resource Compiler - An Overview