This message is sent when a window becomes active or inactive.
wParam
The low-order word specifies the new state of the window. It is one of the following values:
Value | Description |
0 | The window is inactive. |
1 | The window is being activated through some method other than a mouse click (for example, through a call to the Set- ActiveWindow function or selection of the window by the user through the keyboard interface). |
2 | The window is being activated by a mouse click by the user. Any mouse button can be clicked: right, left, or middle. |
The high-order word of the wParam parameter is nonzero if the window is minimized. Otherwise, it is zero.
lParam
Identifies a window and specifies its state. The value of lParam depends on the value of the low-order word of the wParam parameter. If the low-order word of the wParam is zero, lParam is a handle to the window being activated. If the low-order word of the wParam is nonzero, lParam is the handle of the window being inactivated (this handle may be NULL).
If the window is being activated and is not minimized, the DefWindowProc function sets the input focus to the window.