This is my code. My app dispalys the doc contents in a tree view. Is there a better way to get the main frame title or tree view to empty?
CMyDoc::OnFileClose()
{
DeleteContents();
m_docOpenFlag = false;
UpdateAllViews(NULL);
}
void CMyView::OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint)
{
if(pMyDoc->m_docOpenFlag == false)
{
CTreeCtrl& tree = GetTreeCtrl();
tree.DeleteAllItems();
AfxGetMainWnd()->SetWindowText(_T("BWE"));
}