Defining Windows

This section provides the mandatory and optional for the following window resources:

  • Windows and Dialogs

  • Event Masks

The Resource Properties Index identifies and describes the optional properties for windows and dialogs.

Windows and Dialogs

Windows, also known as Forms or Top Level Windows, are the base GUI elements in which most other elements must reside. Windows usually have a title bar, and close, minimize, and maximize buttons on the title bar. Windows can contain child windows, controls, and menus, but nothing can contain a Window. A window can also serve as a dialog box.

The following lists the mandatory properties for windows and dialogs:

window resource-id"title"x, y, width, height

The following describes the window and dialog properties:




Identifies the resource as a window.


Unique resource ID number that identifies the window in the resource file. It must be an integer between 1 and 32767.


Title of the window, contained in quotation marks.


Horizontal position of the upper-left corner of the window in current units.


Vertical position of the upper-left corner of the window in current units.


Width of the window in current units.


Height of the window in current units.

Current Units Settings

Setting the current units determines the unit type for a window and its contained controls and elements. This is set at the window level only.

Unit Type

Current Unit Setting


currentunits 0


currentunits 1


currentunits 2

Dialog Box Settings

Setting the following properties defines a window as a dialog box:

Alwaysontop,Dialogbehavior,Dialogborder,Gravity,Keyboardnavigation,Not Maximizable, and Not Sizable.

Event Masks

Event masks filter the events reported by the current window.



Push Button


Control Focus Gained/Lost

Edit Control Modify


List Item Click

Menu Selection

Mouse Button Down

Mouse Button Up

Mouse Double-Click

Mouse Move


Right Mouse Button Down

Scrollbar Move

System Color Change

Tool Button Push

Window Close Box

Window Focus Gained/Lost

Window Resize