Jump to content

WinDefSecondaryWindowProc

From EDM2

This function provides the default behavior for a secondary window.

Syntax

#define INCL_SW
#include <os2.h>

HWND       hwnd;   /*  Dialog window handle. */
ULONG      msg;    /*  Message identity. */
MPARAM     mp1;    /*  Parameter 1. */
MPARAM     mp2;    /*  Parameter 2. */
MRESULT    rc;     /*  Returns MRESULT. */

rc = WinDefSecondaryWindowProc(hwnd, msg, mp1, mp2);

Parameters

hwnd (HWND) - input
Dialog window handle.
msg (ULONG) - input
Message identity.
mp1 (MPARAM) - input
Parameter 1.
mp2 (MPARAM) - input
Parameter 2.

Return Value

rc (MRESULT) - returns
Returns the MRESULT defined by the message passed to this function.

Remarks

A secondary window procedure must reference this function for messages that are not handled explicitly. Refer to WinDefDlgProc in the IBM OS/2 Presentation Manager Programming Reference.

Example Code

The following code illustrates how to provide default behavior for a secondary window.

 #define INCL_SW
 #include <os2me.h>

 MRESULT MyDlgProc (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
 {
    switch (msg) {
       /* Handle specific messages here */
    }

    /* Call WinDefSecondaryWindowProc for default processing */
    return (WinDefSecondaryWindowProc (hwnd, msg, mp1, mp2));
 }

Related Functions