The following code illustrates how to cause modal WinProcessSecondaryWindows or WinSecondaryWindow calls to return.
#define INCL_SW #include <os2me.h> case WM_COMMAND: switch (SHORT1FROMMP(mp1)) { case DID_CANCEL: /* Dismiss the window */ WinDismissSecondaryWindow (hwnd, DID_CANCEL); break; }