Modal action windows are used to carry out a dialog with the user in order to define or qualify the properties of a data object upon which the user is operating or wishes to operate. It is important to differentiate the properties of a data object from its contents; for instance, the properties of a text file might be its name, parent directory, archive/hidden/read-only attributes etc, whereas its contents would be the text within the file. Under Presentation Manager, manipulation of an object's contents is typically carried out in a standard window, whereas definition or alteration of attributes is done using a dialog box.
Note that where the dialog with the user is limited to a simple decision, a Presentation Manager message box should be used in preference to a dialog box for the implementation of an action window, since the coding effort and processing overhead associated with a message box is much less than that associated with loading and processing a dialog box. See Message Boxes for more information on the use of message boxes.
A modal dialog box is typically loaded and processed in a single step using the WinDlgBox() call. The modal nature of the dialog box is indicated to the user by a double blue line as the border for the dialog box, rather than the standard window border. The different border indicates that the dialog box is modal, and also indicates that it may not be sized by the user. This border is specified in the dialog template using the FCF_DLGBORDER attribute.
By default, a modal dialog box is application-modal; that is, the user must complete interaction with the dialog box before any further interaction may take place with windows in the current application. A dialog box may also be system-modal, in which case the user must complete interaction with the dialog box before interacting with any other window in the system. A system-modal dialog box is created in the same way as an application-modal dialog box, but with the additional attribute FS_SYSMODAL specified in the dialog template.