Example #1
0
void CStorageDoc::Close (bool blAsk/* = true*/, bool blSave/* = true*/) {
	if (blSave)
		OnSaveDocument (GetPathName ());
	if (!blAsk)
		SetModifiedFlag (false);
	OnCloseDocument ();
}
Example #2
0
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;
}
Example #4
0
void CDocument::OnFileClose()
{
	if (!SaveModified())
		return;

	// shut it down
	OnCloseDocument();
		// this should destroy the document
}
Example #5
0
void CDocument::OnChangedViewList()
/*********************************/
{
    if( m_bAutoDelete && GetFirstViewPosition() == NULL ) {
        OnCloseDocument();
    } else {
        UpdateFrameCounts();
    }
}
Example #6
0
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();
}
Example #7
0
void CDocument::OnFinalRelease()
{
	ASSERT_VALID(this);

	OnCloseDocument();  // may 'delete this'
}