WM_MDIACTIVATE
/* Message sent to MDI client */
wParam = (WPARAM) (HWND) hwndChildAct; /* child to activate */
lParam = 0L; /* not used, must be zero */
/* Message received by MDI child */
wParam = (WPARAM) fActivate; /* activation flag */
hwndAct = (HWND) LOWORD(lParam); /* child being activated */
hwndDeact = (HWND) HIWORD(lParam); /* child being deactivated */
An application sends the WM_MDIACTIVATE message to a multiple document interface (MDI) client window to instruct the client window to activate a different MDI child window. As the client window processes this message, it sends WM_MDIACTIVATE to the child window being deactivated and to the child window being activated.
In message sent to MDI client window:
hwndChildAct
Value of wParam. Identifies the MDI child window to be activated.
In message received by MDI child window:
fActivate
Value of wParam. Specifies whether to activate or deactivate the child window. If this parameter is TRUE, the child window is activated. If this parameter is FALSE, the child window is deactivated.
hwndAct
Value of the low-order word of lParam. Identifies the child window being activated.
hwndDeact
Value of the high-order word of lParam. Identifies the child window being deactivated.
An application should return zero if it processes this message.
An MDI child window is activated independently of the MDI frame window. When the frame window becomes active, the child window that was last activated with the WM_MDIACTIVATE message receives the WM_NCACTIVATE message to draw an active window frame and title bar; it does not receive another WM_MDIACTIVATE message.