Share via


CWnd::OnMDIActivate

The framework calls this member function for the child window being deactivated and the child window being activated.

afx_msg void OnMDIActivate( 
   BOOL bActivate, 
   CWnd* pActivateWnd, 
   CWnd* pDeactivateWnd  
);

Parameters

  • bActivate
    TRUE if the child is being activated and FALSE if it is being deactivated.

  • pActivateWnd
    Contains a pointer to the MDI child window to be activated. When received by an MDI child window, pActivateWnd contains a pointer to the child window being activated. This pointer may be temporary and should not be stored for later use.

  • pDeactivateWnd
    Contains a pointer to the MDI child window being deactivated. This pointer may be temporary and should not be stored for later use.

Remarks

An MDI child window is activated independently of the MDI frame window. When the frame becomes active, the child window that was last activated with a OnMDIActivate call receives an WM_NCACTIVATE message to draw an active window frame and caption bar, but it does not receive another OnMDIActivate call.

Note

This member function is called by the framework to allow your application to handle a Windows message. The parameters passed to your function reflect the parameters received by the framework when the message was received. If you call the base-class implementation of this function, that implementation will use the parameters originally passed with the message and not the parameters you supply to the function.

Requirements

Header: afxwin.h

See Also

Reference

CWnd Class

Hierarchy Chart

CMDIFrameWnd::MDIActivate

CMDIFrameWnd::MDIActivate