Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
ICON statement (1.2)
◄Icon resource► ◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
The Resource Compiler ICON Statement (Control)
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.
Field Description
────────────────────────────────────────────────────────────────────────────
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 an integer in
the range 0 through 65,535, or a simple expression that evaluates
to a value in that range.
x Specifies the x-coordinate of the lower-left corner of the control.
This value must be an integer in the range 0 through 65,535 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 an integer in the range 0 through 65,535 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. For a list of possible styles, see
the topic ◄Static styles►. 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
See Also
CONTROL, DIALOG, WINDOW
♦