WM_MDIACTIVATE

3.0

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.

Parameters

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.

Return Value

An application should return zero if it processes this message.

Comments

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.

See Also

WM_MDIGETACTIVE, WM_NCACTIVATE, WM_MDINEXT