Who said they were the same? I said either creates a screen!
I also left out all the "ORs" eg DialogBox[Indirect][Param] or CreateDialog[indirect][Param] to create a screen, or a slightly more complex way to do a message loop:
Code:
DO WHILE PeekMessage( msg, %NULL, %NULL, %NULL, %PM_REMOVE) if msg.message = %WM_QUIT THEN EXIT, EXIT ELSE IF ISFALSE IsDialogMessage (ghCurrentTabDlg, msg) THEN IF ISFALSE IsDialogMessage (hDlg, msg) THEN TranslateMessage msg 'nope, so dispatch it DispatchMessage msg END IF END IF END IF WEND Result = MsgWaitForMultipleObjects (2&, BYVAL VARPTR(hEvent(0)), %FALSE, %INFINITE, %QS_ALLINPUT) IF Result = %WAIT_OBJECT_0 + SubPayerEvent then PostMessage hDlg, msgPayerChange, 0, 0 ELSEIF Result = %WAIT_OBJECT_0 + SubProviderEvent then PostMessage hDlg, msgProviderChange, 0, 0 ELSEIF Result = %WAIT_FAILED THEN MSGBOX "MsgWaitForMultipleObjects Failed", %MB_ERRSTYLE, $MB_ERRTITLE 'ELSEIF result = %WAIT_OBJECT_0 +2 THEN ' just allow fallthru will get picked up above ELSE MSGBOX "Returned from MsgWaitForMultipleObjects with unexpected result index=" & STR$(Result - %WAIT_OBJECT_0),%MB_ERRSTYLE, $MB_ERRTITLE END IF LOOP
MCM
Leave a comment: