DefWindowProc
Windows Mobile 6.5
A version of this page is also available for
4/8/2010
This function calls the default window procedure to provide default processing for any window messages that an application does not process. This function ensures that every message is processed. DefWindowProc is called with the same parameters received by the window procedure.
LRESULT DefWindowProc( HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam );
- hWnd
-
[in] Handle to the window procedure that received the message.
- Msg
-
[in] Specifies the message
- wParam
-
[in] Specifies additional message information. The content of this parameter depends on the value of the Msg parameter.
- lParam
-
[in] Specifies additional message information. The content of this parameter depends on the value of the Msg parameter.
The following code sample describes how a mouse move initiates window procedures.
case WM_MOUSEMOVE:
{
hUIWnd = GetWindow(hStatusWnd, GW_OWNER);
hUIPrivate = (HLOCAL)GetWindowLong(hUIWnd, IMMGWL_PRIVATE);
if (!hUIPrivate)
return DefWindowProc (hStatusWnd, uMsg, wParam, lParam);
lpUIPrivate = (LPUIPRIV)LocalLock(hUIPrivate);
if (!lpUIPrivate)
return DefWindowProc (hStatusWnd, uMsg, wParam, lParam);
if (lpUIPrivate->dwUIMoveOffset != WINDOW_NOT_DRAG) {
POINT ptCursor;
DrawDragBorder(hStatusWnd, lpUIPrivate->dwUIMoveXY,
lpUIPrivate->dwUIMoveOffset, lpUIPrivate->rcWorkArea);
GetCursorPos(&ptCursor);
lpUIPrivate->dwUIMoveXY = MAKELONG(ptCursor.x, ptCursor.y);
DrawDragBorder(hStatusWnd, lpUIPrivate->dwUIMoveXY,
lpUIPrivate->dwUIMoveOffset, lpUIPrivate->rcWorkArea);
}
else {
LocalUnlock(hUIPrivate);
return DefWindowProc (hStatusWnd, uMsg, wParam, lParam);
}
LocalUnlock(hUIPrivate);
}
Community Additions
Show: