WinDefWindowProc
Appearance
This function invokes the default window procedure.
Syntax
WinDefWindowProc(hwnd, ulMsgid, mpParam1, mpParam2)
Parameters
- hwnd (HWND) - input
- Window handle.
- ulMsgid (ULONG) - input
- Message identity.
- mpParam1 (MPARAM) - input
- Parameter 1.
- mpParam2 (MPARAM) - input
- Parameter 2.
Errors
Possible returns from WinGetLastError;PMERR_INVALID_HWND (0x1001)
- An invalid window handle was specified.
Returns
- mresReply (MRESULT) - returns
- Message-return data.
Remarks
The default window provides default processing for any window messages that an application chooses not to process. It can be used to ensure that every message is processed. This function should be made with the same parameters as those received by the window procedure.
The action taken by the default window procedure, the values passed in mpParam1, mpParam2 and the values returned in mresReply are defined for each ulMsgid.
Example Code
This example uses the default window procedure, called by WinDefWindowProc, for default processing of non supported window messages.
#define INCL_WINWINDOWMGR /* Window Manager Functions */ #include <os2.h> MRESULT GenericWndProc(HWND hwnd, ULONG ulMsgid, MPARAM mpParam1, MPARAM mpParam2) { switch(ulMsgid) { /* . . process user supported messages . */ default: return (WinDefWindowProc(hwnd, ulMsgid, mpParam1, mpParam2)); } }