This message occurs when the cursor is in an inactive window and any mouse button is pressed. The parent receives this message only if the child passes it to the DefWindowProc function.
Parameter | Description |
wParam | Contains a handle to the topmost parent window of the window being activated. | |
lParam | Contains the hit-test area code in the low-order word and the mouse message number in the high-order word. A hit test is a test that determines the location of the cursor. |
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. |
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 TRUE, processing is halted.
For a description of the individual hit-test area codes, see Table R.2, “Hit-Test Codes.”