Example #1
0
void CFrameWnd::OnActivate( UINT nState, CWnd *pWndOther, BOOL bMinimized )
/*************************************************************************/
{
    CWnd::OnActivate( nState, pWndOther, bMinimized );

    CFrameWnd *pTopLevel = GetTopLevelFrame();
    if( nState == WA_INACTIVE && pWndOther != pTopLevel &&
        (pWndOther == NULL || pWndOther->GetTopLevelFrame() != pTopLevel) ) {
        NotifyFloatingWindows( FS_DEACTIVATE );
    } else {
        NotifyFloatingWindows( FS_ACTIVATE );
    }
    
    CView *pView = GetActiveView();
    if( pView != NULL ) {
        pView->OnActivateFrame( nState, this );
    }
}