Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5d

Application v 5.25a

  

 

Chapter NineDialog Functions (continued) 

9.5 The Dialog Resource

9.5.1 Introduction

In order to display a dialog box, a template must be defined that expresses the contents and layout of each page of the dialog. Dialog resources can be placed within the main body of the script or as part of a resource file ending with the file extension .rc. Resource files (and sections) are not processed in the same manner as scripts. Rather, they are compiled at runtime and held until later referenced by the DialogBox function.

To embed dialog resources, enclose the resource statements in the #beginresource and #endresource directives. The resources can be placed anywhere in any of the included or main script files.

For compatibility purposes, the Legato resource compiler follows the Microsoft specification for resource controls. More information is available within the Microsoft Developer Network (http://msdn.microsoft.com).

9.5.2 Resource Structure

A dialog resource consists of a definition with header and controls. For example:

name DIALOG | DIALOGEX params

header ...

{

  controls ...

  }

The start of a dialog resource is defined by the DIALOG or DIALOGEX keyword. (Both keywords are supported for compatibility with third-party editing software.) At this point, the resource is named and the position and size of the dialog are defined.

Optional statements follow that define other dialog properties such as a starting caption, styles and dialog font information.

The controls are started by an open brace ‘{’ or a BEGIN statement. Each control is defined on a separate line for a maximum of 255 and then ended with a close brace ‘}’or an END statement. This area is also known as the dialog body.

Each statement must be on its own text line.

9.5.3 Resource Statements

Dialog Header:

BEGIN or { — Starts the control segment.

END or } — Ends the control statements. 

CAPTION — Sets dialog or tag caption.

CHARACTERISTICS — Sets characteristics data (not used, for third-party support).

CLASS — Sets the dialog class.

DIALOG — Starts dialog resource.

DIALOGEX — Starts dialog resource.

EXSTYLE — Sets extended window styles for the dialog page.

FONT — Sets the default dialog font.

MENU — Sets a dialog menu.

STYLE — Sets dialog page window styles.

Controls:

AUTO3STATE — Creates an auto tri-state checkbox.

AUTOCHECKBOX — Creates a checkbox with auto state change.

AUTORADIOBUTTON — Creates a radio button with auto state change.

CHECKBOX — Creates a checkbox (manual).

COMBOBOX — Creates a combination list box and edit control.

CONTROL — Creates any control using any window class name.

CTEXT — Creates a static text control with centered text.

DEFPUSHBUTTON — Creates a push style button with the default button style set.

EDITTEXT — Creates a text edit control.

GROUPBOX — Creates a group area for visual grouping. Also provides programmatic auto processing for radio controls.

ICON — Creates a static Icon control.

LISTBOX — Creates a list box style control.

LTEXT — Creates a left static text control.

PUSHBOX — Creates a flat push box style button.

PUSHBUTTON — Creates a push button style control.

RADIOBUTTON — Creates a radio control button.

RTEXT — Creates a right aligned static control.

SCROLLBAR — Creates a scrollbar control.

STATE3 — Creates a tri-state checkbox.