| 
 Purpose  | 
 Process pending window or dialog messages for MODELESS dialogs. If there are no pending messages, DIALOG DOEVENTS pauses execution of the current thread for a length of time specified by the programmer.  | 
| 
 Syntax  | 
 DIALOG DOEVENTS [sleep&] [TO count&]  | 
| 
 Remarks  | 
 DIALOG DOEVENTS is usually used to create a "message pump" for modeless dialog boxes. If a window message is pending, it is processed appropriately.  If 
 no messages are pending, execution of the current 
  | 
| 
 Restrictions  | 
 The DIALOG DOEVENTS loop must run for the duration of the modeless dialog(s), or they will not respond or be redrawn correctly.  | 
| 
 See also  | 
 Dynamic Dialog Tools, DIALOG NEW, DIALOG SHOW MODELESS, SLEEP  | 
| 
 Example  | 
 ' Single modeless dialog message pump example. ' (Assume dialog already created with DIALOG NEW) DIALOG SHOW MODELESS hDlg CALL DlgCallback DO DIALOG DOEVENTS 0 TO Count& LOOP WHILE Count& ' Application code continues here... 
 ' Multiple modeless dialog message pump example. ' In some applications, the number of modeless dialogs can vary at any given moment, ' we want to break the message loop when the 'main' dialog is closed. ' (Assume dialogs already created with DIALOG NEW) DIALOG SHOW MODELESS hMainDlg& CALL DlgCallback DIALOG SHOW MODELESS hChildDlg1& DIALOG SHOW MODELESS hChildDlg2& ... DO DIALOG DOEVENTS DIALOG GET SIZE hMainDlg& TO x&, x& LOOP WHILE x& ' When x& = 0, dialog has ended ' Application code continues here...  |