afx_msg void OnActivate( UINT nState, CWnd* pWndOther, BOOL bMinimized );
nState
Indicates the minimized state of the window being activated or deactivated. A nonzero value indicates that the CWnd object is minimized.
pWndOther
Pointer to the CWnd being activated or deactivated. The pointer can be NULL, and it may be temporary.
bMinimized
If TRUE, the CWnd is being activated; otherwise deactivated.
Called when a CWnd object is being activated or deactivated. First, the main window being deactivated has OnActivate called, and then the main window being activated has OnActivate called.
If the CWnd object is activated with a mouse click, it will also receive an OnMouseActivate member function call.
This message-handler member function calls the Default member function. Override this member function in your derived class to handle the WM_ACTIVATE message.
WM_MOUSEACTIVATE, WM_NCACTIVATE, CWnd::Default, WM_ACTIVATE