EVW_EXCDINOUT

This flag is similar to EVW_EXCDFOCUS but just causes any incoming EXITCODE value of -100 or less to be "passed through" (i.e. returned directly) to the application. This is useful (in conjunction with EVW_EXCDFOCUS) for responding to button clicks that occur while INFLD has the focus. For example, you might have a structure like this:

do

   xcall AUI,AUI_EVENTWAIT,CTLID,PARENTID,EXITCODE,OPFLAGS

 

   if <exitcode to exit dialog>

      exit

   else

      call <field handler based on exitcode>

loop

 

With just EVW_EXCDFOCUS alone, if the user clicks on a button while INFLD has the focus (in the "field handler" above), the subsequent EVENTWAIT would merely put the focus on the button without triggering it. (The first click would trigger an exit from the current INFLD, but it would take a second click on the button to invoke the "field handler" for the button, using the logic above.) With EVW_EXCDINOUT added to the OPFLAGS, the button click would cause the "field handler" to exit, as before, but now the EVENTWAIT would also exit, so that the new "field handler" for the button could be called. This is not an issue when clicking on an INFLD field, because the combination of EVW_INFLD+EVW_EXCDFOCUS would cause any attempt to put the focus on an INFLD field to just exit from the EVENTWAIT so that INFLD could be called.

Note that one situation where you might not want EVW_EXCDINOUT is if you want to explicitly put the focus on a button by specifying its EXITCODE, without forcing the button to get clicked.