WM_ACTIVATEAPP
fActive = (BOOL) wParam; /* the activation/deactivation flag */
htask = (HTASK) LOWORD(lParam); /* task handle */
The WM_ACTIVATEAPP message is sent when a window is about to be activated and that window belongs to a different task than the active window. The message is sent to all top-level windows of the task being activated and to all top-level windows of the task being deactivated.
fActive
Value of wParam. Specifies whether the window is being activated or deactivated. A nonzero value means the window is being activated. A zero value means the window is being deactivated.
htask
Value of the low-order word of lParam. Specifies a task handle. If the fActive parameter is nonzero, the handle identifies the task that owns the window being deactivated. If fActive is zero, the handle identifies the task that owns the window being activated.
An application should return zero if it processes this message.