void CBCGPOleServerDoc::OnShowControlBars(CFrameWnd* pFrameWnd, BOOL bShow) { COleServerDoc::OnShowControlBars (pFrameWnd, bShow); CBCGPOleCntrFrameWnd* pMainFrame = DYNAMIC_DOWNCAST (CBCGPOleCntrFrameWnd, pFrameWnd); if (pMainFrame != NULL) { ASSERT_VALID (pMainFrame); CBCGPDockManager* pDockManager = pMainFrame->GetDockManager (); if (pDockManager != NULL) { ASSERT_VALID (pDockManager); pDockManager->ShowControlBars (bShow); } } }
void CBCGPOleServerDoc::OnDocWindowActivate( BOOL bActivate ) { if (bActivate) { COleServerDoc::OnDocWindowActivate (bActivate); return; } CBCGPOleCntrFrameWnd* pMainFrame = NULL; CBCGPOleDocIPFrameWnd* p_IpDocFrame = DYNAMIC_DOWNCAST (CBCGPOleDocIPFrameWnd, m_pInPlaceFrame); if (p_IpDocFrame != NULL) { pMainFrame = p_IpDocFrame->GetContainerFrameWindow (); } else { CBCGPOleIPFrameWnd* p_IpFrame = DYNAMIC_DOWNCAST (CBCGPOleIPFrameWnd, m_pInPlaceFrame); if (p_IpFrame != NULL) { pMainFrame = p_IpFrame->GetContainerFrameWindow (); } } if (pMainFrame == NULL) { return; } CBCGPDockManager* pDockManager = pMainFrame->GetDockManager (); ASSERT_VALID (pDockManager); pDockManager->ShowControlBars(bActivate); COleServerDoc::OnDocWindowActivate (bActivate); }