| | | | Browse by category |
Article ID: 208
Last updated: 04 Jun, 2018
Problem
p>6.46.07 How can I insert and remove worksheets at runtime?
Cause
Action
Here is some self-explanatory sample code:
void CMyGridView::OnUpdateEditInsertsheet(CCmdUI* pCmdUI) { |
|||
CGXTabWnd* pTabWnd = GetParentTabWnd(this, TRUE); pCmdUI->Enable(pTabWnd != NULL); |
|||
}
void CMyGridView::OnEditInsertsheet() |
|||
CGXTabWnd* pTabWnd = GetParentTabWnd(this, TRUE);
if (pTabWnd) |
|||
pTabWnd->CreateView(RUNTIME_CLASS(CMyGridView), _T(New), NULL); pTabWnd->SwitchTab(pTabWnd->GetBeam().GetCount()-1); |
|||
} | |||
}
void CMyGridView::OnEditRemovesheet() |
|||
CGXTabWnd* pTabWnd = GetParentTabWnd(this, TRUE);
if (pTabWnd && pTabWnd->GetBeam().GetCount() > 0) |
|||
pTabWnd->RemoveTab(this); | |||
}
void CMyGridView::OnUpdateEditRemovesheet(CCmdUI* pCmdUI) |
|||
CGXTabWnd* pTabWnd = GetParentTabWnd(this, TRUE); pCmdUI->Enable(pTabWnd && pTabWnd->GetBeam().GetCount() > 0); |
|||
} |
This article was:
Helpful |
Not helpful
Report an issue
Article ID: 208
Last updated: 04 Jun, 2018
Revision: 3
Views: 1692
Posted: 12 Jan, 2001 by
Meltreger B.
Updated: 04 Jun, 2018 by
Meltreger B.
Others in this category
Powered by KBPublisher (Knowledge base software)