void CStorageDoc::Close (bool blAsk/* = true*/, bool blSave/* = true*/) { if (blSave) OnSaveDocument (GetPathName ()); if (!blAsk) SetModifiedFlag (false); OnCloseDocument (); }
void CDocument::OnFileClose() /***************************/ { if( SaveModified() ) { OnCloseDocument(); } }
BOOL CFT2OpenCVDoc::OnNewDocument() { if (!CDocument::OnNewDocument()) return FALSE; //get a pointer to the view object POSITION posV = GetFirstViewPosition(); CFT2OpenCVView * view = (CFT2OpenCVView *) GetNextView(posV); ASSERT_VALID(view); if (!view) { AfxMessageBox(_T("Failed to get view!")); OnCloseDocument(); } //start the kinect m_hWnd = view->GetParentFrame()->m_hWnd; m_FTHelper.Init(m_hWnd, FTHelperCallingBack, this); namedWindow("dxColor", WINDOW_AUTOSIZE); namedWindow("dxDepth", WINDOW_AUTOSIZE); return TRUE; }
void CDocument::OnFileClose() { if (!SaveModified()) return; // shut it down OnCloseDocument(); // this should destroy the document }
void CDocument::OnChangedViewList() /*********************************/ { if( m_bAutoDelete && GetFirstViewPosition() == NULL ) { OnCloseDocument(); } else { UpdateFrameCounts(); } }
void CDocument::OnChangedViewList() { // if no more views on the document, delete ourself // not called if directly closing the document or terminating the app if (m_viewList.IsEmpty() && m_bAutoDelete) { OnCloseDocument(); return; } // update the frame counts as needed UpdateFrameCounts(); }
void CDocument::OnFinalRelease() { ASSERT_VALID(this); OnCloseDocument(); // may 'delete this' }