BOOL CView::OnSplitCmd(UINT) { CSplitterWnd* pSplitter = GetParentSplitter(this, FALSE); if (pSplitter == NULL) return FALSE; ASSERT(!pSplitter->IsTracking()); pSplitter->DoKeyboardSplit(); return TRUE; // attempted at least }
void CView::OnUpdateSplitCmd(CCmdUI* pCmdUI) { CSplitterWnd* pSplitter = GetParentSplitter(this, FALSE); pCmdUI->Enable(pSplitter != NULL && !pSplitter->IsTracking()); }