WndProc
Appearance
This defines the window procedure provided by an application.
Syntax
WndProc(hwnd, msg, mp1, mp2);
Parameters
- hwnd (HWND) - input
- Window handle.
- msg (ULONG) - input
- Message identity.
- mp1 (MPARAM) - input
- Message parameter 1.
- mp2 (MPARAM) - input
- Message parameter 2.
Returns
- mresReply (MRESULT) - returns
- Message-return data.
Remarks
This procedure is associated with a window by the pfnWndProc of the WinRegisterClass function.
The window procedure typically processes only some of the messages passed to it. Those messages it does not process must be passed on to the WinDefWindowProc function, which performs the standard window processing for those messages.
Example Code
#define INCL_WINMESSAGEMGR /* Or use INCL_WIN, INCL_PM, Also in COMMON section */ #include <os2.h> HWND hwnd; /* Window handle. / ULONG msg; / Message identity. / MPARAM mp1; / Message parameter 1. / MPARAM mp2; / Message parameter 2. / MRESULT mresReply; / Message-return data. */ mresReply = WndProc(hwnd, msg, mp1, mp2);