WM_MOUSEACTIVATE

2.x

WM_MOUSEACTIVATE
hwndTopLevel = (HWND) wParam;   /* handle of top-level parent */
wHitTestCode = LOWORD(lParam);  /* hit-test code              */
wMsg = HIWORD(lParam);          /* mouse-message identifier   */

The WM_MOUSEACTIVATE message is sent when the cursor is in an inactive window and the user presses a mouse button. The parent window receives this message only if the child window passes it to the DefWindowProc function.

Parameters

hwndTopLevel

Value of wParam. Identifies the top-level parent window of the window being activated.

wHitTestCode

Value of the low-order word of lParam. Specifies the hit-test area code. A hit test is a test that determines the location of the cursor.

wMsg

Value of the high-order word of lParam. Specifies the identifier of the mouse message.

Return Value

The return value specifies whether the window should be activated and whether the mouse event should be discarded. It must be one of the following values:

Value Meaning

MA_ACTIVATE Activate the window.
MA_NOACTIVATE Do not activate the window.
MA_ACTIVATEANDEAT Activate the window and discard the mouse event.
MA_NOACTIVATEANDEAT Do not activate the window; discard the mouse event.

Comments

If the child window passes the message to the DefWindowProc function, DefWindowProc passes this message to a window's parent window before any processing occurs. If the parent window returns a nonzero value, processing is halted.