WinDefWindowProc: Difference between revisions
Appearance
Created page with "This function invokes the default window procedure. ==Syntax== WinDefWindowProc(hwnd, ulMsgid, mpParam1, mpParam2) ==Parameters== ;hwnd (HWND) - input :Window handle. ;ul..." |
mNo edit summary |
||
Line 1: | Line 1: | ||
This function invokes the default window procedure. | This function invokes the default window procedure. | ||
==Syntax== | ==Syntax== | ||
WinDefWindowProc(hwnd, ulMsgid, mpParam1, mpParam2) | WinDefWindowProc(hwnd, ulMsgid, mpParam1, mpParam2) | ||
==Parameters== | ==Parameters== | ||
;hwnd (HWND) - input | ;hwnd (HWND) - input:Window handle. | ||
:Window handle. | ;ulMsgid (ULONG) - input: Message identity. | ||
;mpParam1 (MPARAM) - input:Parameter 1. | |||
;ulMsgid (ULONG) - input | ;mpParam2 (MPARAM) - input:Parameter 2. | ||
: Message identity. | |||
;mpParam1 (MPARAM) - input | |||
:Parameter 1. | |||
;mpParam2 (MPARAM) - input | |||
:Parameter 2. | |||
==Errors== | ==Errors== | ||
Possible returns from WinGetLastError | Possible returns from WinGetLastError;PMERR_INVALID_HWND (0x1001) | ||
;PMERR_INVALID_HWND (0x1001) | |||
:An invalid window handle was specified. | :An invalid window handle was specified. | ||
==Returns== | ==Returns== | ||
;mresReply (MRESULT) - returns | ;mresReply (MRESULT) - returns:Message-return data. | ||
:Message-return data. | |||
==Remarks== | ==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 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. | 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== | ==Example Code== | ||
This example uses the default window procedure, called by WinDefWindowProc, for default processing of non supported window messages. | This example uses the default window procedure, called by WinDefWindowProc, for default processing of non supported window messages. | ||
Line 49: | Line 43: | ||
} | } | ||
} | } | ||
</pre> | </pre> | ||
Latest revision as of 07:37, 7 August 2023
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)); } }