Jump to content

WinDestroySecondaryWindow

From EDM2

This function eliminates a secondary window.

Syntax

#define INCL_SW
#include <os2.h>

HWND    hwnd;   /*  Secondary window to be eliminated. */
BOOL    rc;     /*  Return codes. */

rc = WinDestroySecondaryWindow(hwnd);

Parameters

hwnd (HWND) - input
Secondary window frame to be eliminated.

Return Value

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

Example Code

The following code illustrates how to destroy secondary windows.

 #define INCL_SW
 #include <os2me.h>

 MRESULT EXPENTRY MyDlgProc (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
 {

    switch (msg) {

       case WM_CLOSE:
          /* Destroy a secondary window */
          WinDestroySecondaryWindow (hwndSecondaryFrame);
          return (TRUE);
          break;

    }

    return (WinDefSecondaryWindowProc (hwnd, msg, mp1, mp2));
 }

Related Functions