VALUESET Statement
Syntax:
VALUESET id, x, y, width, height[, style]
The VALUESET statement creates a value set control within the dialog window.
This control lets a user select one choice from a group of mutually exclusive
choices. The VALUESET statement defines the identifier, position, dimensions,
and attributes of a value set control. The predefined class for this control
is WC_VALUESET. If you do not specify a style, the default style is WS_TABSTOP
and WS_VISIBLE.
id
Specifies the control identifier. The value
is a signed integer -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. The value is a signed integer -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 window.
y
Specifies the y-coordinate of the lower-left
corner of the control. The value is a signed integer -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 window.
width
Specifies the width of the control. The
value is any integer 0 through 65535 or an expression consisting of integers
and the addition (+) or subtraction (-) operator. The width is in n-character
units.
height
Specifies the height of the control.
The value is any integer 0 through 65535 or an expression consisting of
integers and the addition (+) or subtraction (-) operator. The height is
in 1/8-character units.
style
Specifies the control styles. The value
is any combination of the styles specified for WC_VALUESET. You can use
the bitwise OR ( | ) operator to combine styles.
Comments
The VALUESET statement is used only in a DIALOG or WINDOW statement.
Example
This example creates a value set control at position (40, 40) within the
dialog window. The value set control has a width of 220 character and a
height of 20 character units. Its resource identifier is 302. The style
specification VS_ICON creates a control to show items in icon form. The
default styles WS_TABSTOP and WS_VISIBLE are both in effect, though only
WS_TABSTOP is specified.
#define IDC_VALUESET 302#define IDD_VALUESETDLG 501
DIALOG "Value set", IDD_VALUESETDLG, 11, 11, 260, 240, FS_NOBYTEALIGN |
WS_VISIBLE, FCF_SYSMENU | FCF_TITLEBAR
BEGIN
VALUESET IDC_VALUESET, 40, 40, 220, 160, VS_ICON | WS_TABSTOP
END
[Back: undef Directive]
[Next: WINDOW Statement]