This message is sent when a window becomes active or inactive.
| Parameter | Description |
| wParam | Specifies the new state of the window. The wParam parameter is zero if the window is inactive; it is one of the following nonzero values if the window is being activated: | ||
| Value | Meaning | ||
| 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. | ||
| lParam | Identifies a window and specifies its state. The high-order word of the lParam parameter is nonzero if the window is minimized. Otherwise, it is zero. The value of the low-order word of lParam depends on the value of the wParam parameter. If wParam is zero, the low-order word of lParam is a handle to the window being activated. If wParam is nonzero, the low-order word of 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.