WM_ACTIVATEAPP

This message is sent when a window being activated belongs to a different application than the currently active window. The message is sent to the application whose window will be activated and the application whose window will be deactivated.

Parameters

wParam

Specifies whether a window is being activated or deactivated. A nonzero value indicates that Windows will activate a window; zero indicates that Windows will deactivate a window.

lParam

If the wParam parameter is zero, the lParam parameter contains the id of the thread that owns the window that is being activated. If wParam is nonzero, lParam contains the id of the thread that owns the window that is being deactivated.