WINDOW Statement
Syntax:
WINDOW text, id, x, y, width, height, class[, style[, framectl]]
data-definitions
[ BEGIN
control-definition
.
.
.
END ]
The WINDOW statement creates a window of the specified class. The statement
defines the position and dimensions of the window relative to its parent
window, as well as the window-box style. The WINDOW statement is typically
used in a WINDOWTEMPLATE or FRAME statement.
Typically, only one WINDOW statement is used in a FRAME statement. It defines
the client window belonging to the corresponding frame window. The optional
BEGIN and END keywords enclose any CONTROL statements that are given with
the window. CONTROL statements given in this manner represent child windows
belonging to the window created by the WINDOW statement.
text
Specifies the window title if the style specifies
a title bar. This field must contain zero or more characters enclosed in
double quotation marks. The character values must be in the range 1 through
255. If a double quotation mark is required in the title, you must include
the double quotation mark twice.
id
Specifies the window 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 window. 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 value is in dialog units. The position
is relative to the origin of the parent window.
y
Specifies the y-coordinate of the lower-left
corner of the window. 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 value is in dialog units. The position
is relative to the origin of the parent window.
width
Specifies the width of the window. This
value must be an integer in the range 0 through 65535 or an expression consisting
of integers and the addition (+) or subtraction (-) operator. The value
is in n-character units.
height
Specifies the height of the window.
This value must be an integer in the range 0 through 65535 or an expression
consisting of integers and the addition (+) or subtraction (-) operator.
The value is in 1/8-character units.
class
Specifies the window class. This value
can be one of the control classes specified in the "Control Classes" table
in the Presentation Manager Programmer Reference or the name of the
window class, enclosed in double quotation marks.
style
Specifies the window style. This value
can be any of the window, dialog box, or frame styles specified.
framectl
Specifies the style of the frame
controls belonging to the window. This value can be a combination of the
styles specified in the table, "Frame-Control Styles." You can use the bitwise
OR (|) operator to combine styles.
data-definitions
Specifies a CTLDATA and/or
PRESPARAMS statement. These statements define control and presentation data
for the window. For more information, see CTLDATA
Statement and PRESPARAMS Statement.
control-definition
Specifies a CONTROL statement
or any one of several predefined control statements. These statements define
the style, position, and dimensions of controls in the window.
Comments
The WINDOW statement can actually contain any combination of CONTROL, DIALOG,
and WINDOW statements. Typically, a WINDOW statement contains one or no
such statements.
Example
This example creates a client window belonging to the frame window. The
client window belongs to the "MyClientClass" window class and has the standard
window identifier FID_CLIENT.
WINDOWTEMPLATE 1BEGIN
FRAME "My Window", 1, 10, 10, 320, 130,
0, FCF_STANDARD | FCF_VERTSCROLL
BEGIN
WINDOW "", FID_CLIENT, 0, 0, 0, 0, "MyClientClass"
END
END
[Back: VALUESET Statement]
[Next: WINDOWTEMPLATE Statement]