WM_ACTIVATE top-level constant
Sent to both the window being activated and the window being deactivated.
If the windows use the same input queue, the message is sent synchronously, first to the window procedure of the top-level window being deactivated, then to the window procedure of the top-level window being activated. If the windows use different input queues, the message is sent asynchronously, so the window is activated immediately.
const WM_ACTIVATE = 0x0006;