多文档 选项卡
void CTabMDIDemoView::OnInitialUpdate() { CView::OnInitialUpdate(); // TODO: Add your specialized code here and/or call the base class CTabMDIDemoDoc * pDoc = GetDocument(); ASSERT_VALID(pDoc); CString cs=pDoc->GetTitle(); ((CMainFrame*)AfxGetMainWnd())->m_ViewManager.AddView(cs,this); } void CTabMDIDemoView::OnActivateView(BOOL bActivate, CView* pActivateView, CView* pDeactiveView) { // TODO: Add your specialized code here and/or call the base class ((CMainFrame*)AfxGetMainWnd())->m_ViewManager.OnActivateV iew(bActivate, this); ((CMainFrame*)AfxGetMainWnd())->SendMessage(WM_SIZE); CView::OnActivateView(bActivate, pActivateView, pDeactiveView); } iew(bActivate, this); ((CMainFrame*)AfxGetMainWnd())->SendMessage(WM_SIZE); CView::OnActivateView(bActivate, pActivateView, pDeactiveView); }