Dialog Box'sA dialog box is a pop-up windows that contains a system menu and a variety of dialog box items. Dialog box's are created from with in a batch program using the DLGBOX command. The items are added to a dialog box using the DLGITEM command. Dialog box's may include any of the following items :-
Unlike the procedures assigned to items, which handle events generated by each item, a dialog box may also be assigned a procedure, which is called only once just before the dialog box is displayed. Typically, the procedure assigned to a dialog box is used to initialise any of the items contained in the dialog box. There are a number of commands that may be used to manipulate items contained in a dialog box. In general, these commands will be used from with in the procedures assigned to the items in a dialog box that generate events. Once a dialog box is no longer needed the DLGEND command may be used to close the dialog box and cause the batch program to return control to the respective DLGSHOW command that was used to displayed the dialog box. Essentially, dialog box's are written using a methodology which is commonly referred to as event-driven programming which differs from a typical batch program which uses a sequential programming methodology. Sequential programs have a distinct beginning, flow of control (ie. a logical sequence of events) and a distinct end, as follows :-
![]() Event-driven batch programs are controlled by the occurrence of events generated by the items contained in each dialog box and unlike the sequential methodology, these events may occur in any order. The following outlines the event-driven methodology :-
![]() Dialog box's may be nested, that is, dialog box's may be created, displayed and manipulated from with in another dialog box. This includes using any of the special purpose built in dialog box's such as MSGBOX, EDITBOX, DISPBOX, OPENBOX and SAVEBOX. WinOne® includes a Dialog Editor which simplifies the process of designing a dialog box. See the Dialog Editor documentation for more information about the Dialog Editor. |
|
|
|
|
|
|
Copyright © 1995-2005 Lucien Cinc, All Rights Reserved
WinOne is an Australian registered trademark of Lucien Cinc