Jump to content

WinDismissSecondaryWindow

From EDM2

This function causes modal WinProcessSecondaryWindow or WinSecondaryWindow calls to return.

Syntax

#define INCL_SW
#include <os2.h>

HWND    hwndDlg;   /*  Secondary dialog window. */
ULONG   ulResult;  /*  Result. */
BOOL    rc;        /*  Return codes. */

rc = WinDismissSecondaryWindow(hwndDlg, ulResult);

Parameters

hwndDlg (HWND) - input
Secondary dialog window.
ulResult (ULONG) - input
Result to be returned by WinSecondaryWindow or WinProcessSecondaryWindow.

Return Value

rc (BOOL) - returns
Return codes indicating success or failure:
  • TRUE: Success.
  • FALSE: Failure or not recognized.

Remarks

Refer to WinDismissDlg in the IBM OS/2 Presentation Manager Programming Reference.

Example Code

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;
    }

Related Functions