www.pudn.com > UltraSound.rar > UltraSoundDoc.cpp


// UltraSoundDoc.cpp : implementation of the CUltraSoundDoc class 
// 
 
#include "stdafx.h" 
#include "UltraSound.h" 
 
#include "UltraSoundDoc.h" 
 
#ifdef _DEBUG 
#define new DEBUG_NEW 
#undef THIS_FILE 
static char THIS_FILE[] = __FILE__; 
#endif 
 
///////////////////////////////////////////////////////////////////////////// 
// CUltraSoundDoc 
 
IMPLEMENT_DYNCREATE(CUltraSoundDoc, CDocument) 
 
BEGIN_MESSAGE_MAP(CUltraSoundDoc, CDocument) 
	//{{AFX_MSG_MAP(CUltraSoundDoc) 
		// NOTE - the ClassWizard will add and remove mapping macros here. 
		//    DO NOT EDIT what you see in these blocks of generated code! 
	//}}AFX_MSG_MAP 
END_MESSAGE_MAP() 
 
///////////////////////////////////////////////////////////////////////////// 
// CUltraSoundDoc construction/destruction 
 
CUltraSoundDoc::CUltraSoundDoc() 
{ 
	// TODO: add one-time construction code here 
	m_ImgNum = 0; 
	for(int i=0;i<1000;i++) 
	{ 
		m_pImageList[i] = NULL; 
	} 
 
} 
 
CUltraSoundDoc::~CUltraSoundDoc() 
{ 
	for(int i=0;i<1000;i++) 
	{ 
		cvReleaseImage(&m_pImageList[i]); 
		m_pImageList[i] = NULL; 
	} 
} 
 
BOOL CUltraSoundDoc::OnNewDocument() 
{ 
	if (!CDocument::OnNewDocument()) 
		return FALSE; 
 
	// TODO: add reinitialization code here 
	// (SDI documents will reuse this document) 
 
	return TRUE; 
} 
 
///////////////////////////////////////////////////////////////////////////// 
// CUltraSoundDoc serialization 
 
void CUltraSoundDoc::Serialize(CArchive& ar) 
{ 
	if (ar.IsStoring()) 
	{ 
		// TODO: add storing code here 
	} 
	else 
	{ 
		// TODO: add loading code here 
	} 
} 
 
///////////////////////////////////////////////////////////////////////////// 
// CUltraSoundDoc diagnostics 
 
#ifdef _DEBUG 
void CUltraSoundDoc::AssertValid() const 
{ 
	CDocument::AssertValid(); 
} 
 
void CUltraSoundDoc::Dump(CDumpContext& dc) const 
{ 
	CDocument::Dump(dc); 
} 
#endif //_DEBUG 
 
///////////////////////////////////////////////////////////////////////////// 
// CUltraSoundDoc commands