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.
FRAME (1.2)
◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
The Resource Compiler FRAME Statement
FRAME text, id, x, y, width, height[, style][, framectl]
[ data-definitions ]
[ BEGIN
window-definition
.
.
.
END ]
The FRAME statement defines a frame window. The statement defines the title,
identifier, position, and dimensions of the frame window, as well as the
window style. The FRAME statement is most often used in a WINDOWTEMPLATE
statement, and typically, only one FRAME statement is used. The FRAME
statement, in turn, typically contains at least one WINDOW statement that
defines the client window belonging to the frame window.
The frame window has no default style. You must use the framectl field to
define additional frame controls, such as a title bar and system menu, to be
created when the frame window is created. If the text field is not empty,
the statement automatically adds a title-bar control to the frame window,
whether or not you specify the FCF_TITLEBAR style. Frame controls are given
default styles and control identifiers depending on their class. For
example, a title-bar control receives the identifier FID_TITLEBAR.
Field Description
────────────────────────────────────────────────────────────────────────────
text Specifies the title of the frame window. This field must
contain zero or more characters enclosed in double
quotation marks. Character values must be in the range 1
through 255. If a double quotation mark is required in
the name, you must include the double quotation mark
twice.
id Specifies the window 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 window. 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 window.
y Specifies the y-coordinate of the lower-left corner of
the window. 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 window.
width Specifies the width of the window. This value must be an
integer in the range 1 through 65,535 or an expression
consisting of integers and the addition (+) or
subtraction (-) operator. The width is in ¼-character
units.
height Specifies the height of the window. This value must be an
integer in the range 1 through 65,535 or an expression
consisting of integers and the addition (+) or
subtraction (-) operator. The height is in 1/8-character
units.
style Specifies the frame and window styles. This value can be
a combination of the styles specified in the table,
"Frame Styles". (◄Frame Styles►) You can use the bitwise
OR (|) operator to combine styles.
framectl Specifies the styles of frame controls belonging to the
frame window. For a list of possible styles, see the
topic ◄Frame 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
frame window. For more information, see the CTLDATA and
PRESPARAMS topics.
window-definition Specifies a WINDOW statement or any one of several
predefined control statements. These statements define
the style, position, and dimensions of windows or
controls in the frame window.
Comments
The FRAME statement can actually contain any combination of CONTROL, DIALOG,
and WINDOW statements. Typically, a FRAME statement contains one WINDOW
statement.
Example
This example creates a standard frame window, with a title bar, a system
menu, minimize and maximize boxes, and a vertical scroll bar. The FRAME
statement contains a WINDOW statement defining the client window belonging
to the frame window.
WINDOWTEMPLATE 1
BEGIN
FRAME "My Window", 1, 10, 10, 320, 130, 0, FCF_STANDARD | FCF_VERTSCROLL
BEGIN
WINDOW "", FID_CLIENT, 0, 0, 0, 0, "MyClientClass"
END
END
See Also
CONTROL, CTLDATA, DIALOG, PRESPARAMS, WINDOW, WINDOWTEMPLATE
♦