rc.hlp (Table of Contents; Topic list)
DIALOG (1.2)
                                                      Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
 
                   The Resource Compiler DIALOG Statement
 
DIALOG text, id, x, y, width, height[, [style][, framectl]]
[data-definitions]
BEGIN
control-definition
    .
    .
    .
END
 
The DIALOG statement defines a window that an application can use to create
dialog boxes. The statement defines the position and dimensions of the
dialog box on the screen, as well as the dialog-box style. The DIALOG
statement is most often used in a DLGTEMPLATE statement.
 
Typically, you use only one DIALOG statement in each DLGTEMPLATE statement,
and the DIALOG statement contains at least one control definition.
 
Field               Description
────────────────────────────────────────────────────────────────────────────
 
text                Specifies the dialog-box title if the style specifies a
                    title bar. 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 title, you must
                    include the double quotation mark twice.
 
id                  Specifies the dialog-box 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 dialog box. 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 value is in dialog units, but its exact
                    meaning depends on the dialog style. See the "Comments"
                    topic for details.
 
y                   Specifies the y-coordinate of the lower-left corner of
                    the dialog box. 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 value is in dialog units, but its exact
                    meaning depends on the dialog style. See the "Comments"
                    topic for details.
 
width               Specifies the width of the dialog box. 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 value is in ¼-character
                    units.
 
height              Specifies the height of the dialog box. 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 value is in
                    1/8-character units.
 
style               Specifies the control style. For a list of possible
                    classes, see the topic Control 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
                    dialog box. For more information, see the CTLDATA and
                    PRESPARAMS topics.
 
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
                    dialog box.
 
Comments
 
The exact meaning of the coordinates depends on the style defined by the
style field. For dialog boxes with FS_SCREENALIGN style, the coordinates are
relative to the origin of the display screen. For dialog boxes with the
style FS_MOUSEALIGN, the coordinates are relative to the position of the
mouse pointer at the time the dialog box is created. For all other dialog
boxes, the coordinates are relative to the origin of the parent window.
 
The DIALOG statement can actually contain any combination of CONTROL,
DIALOG, and WINDOW statements. Typically, a DIALOG statement contains one or
more CONTROL statements.
 
Example
 
This example creates a dialog box that is labeled "Disk Error".
 
DLGTEMPLATE 1
BEGIN
    DIALOG  "Disk Error", 100, 10, 10, 300, 110
    BEGIN
        CTEXT "Select One:", 1, 10, 80, 280, 12
        RADIOBUTTON "Retry", 2, 75, 50, 60, 12
        RADIOBUTTON "Abort", 3, 75, 30, 60, 12
        RADIOBUTTON "Ignore", 4, 75, 10, 60, 12
    END
END
 
See Also
 
CONTROL, CTLDATA, DLGTEMPLATE, PRESPARAMS, WINDOW