⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hoopstestdoc.cpp

📁 使用HOOPS库开发的一个教学演示工具。
💻 CPP
字号:
// hoopstestDoc.cpp : implementation of ChoopstestDoc//#include "StdAfx.h"#include "Resource.h"#include "hoopstest.h"#include "hoopstestDoc.h"#include "hoopstestView.h"#include "HhoopstestModel.h"#include "HUtility.h"#include "HUtilityLocaleString.h"#ifdef _DEBUG#define new DEBUG_NEW#undef THIS_FILEstatic char THIS_FILE[] = __FILE__;#endif/////////////////////////////////////////////////////////////////////////////// ChoopstestDocIMPLEMENT_DYNCREATE(ChoopstestDoc, CHoopsDoc)BEGIN_MESSAGE_MAP(ChoopstestDoc, CHoopsDoc)	//{{AFX_MSG_MAP(ChoopstestDoc)	//}}AFX_MSG_MAPEND_MESSAGE_MAP()ChoopstestDoc::ChoopstestDoc(){	m_pHoopsModel = 0;}ChoopstestDoc::~ChoopstestDoc(){	if (m_pHoopsModel)	{		delete m_pHoopsModel;		m_pHoopsModel = 0;	}}// user has created a new documentBOOL ChoopstestDoc::OnNewDocument(){	if (!CHoopsDoc::OnNewDocument())		return FALSE;	// delete the HhoopstestView object if there is already one	POSITION pos = GetFirstViewPosition();	    	ChoopstestView *pView = (ChoopstestView*)GetNextView(pos);	if( pView )		pView->CleanUp();	// delete the HhoopstestModel object if there is already one	if(m_pHoopsModel)	{		delete m_pHoopsModel;		m_pHoopsModel = NULL;	}	// create a new HhoopstestModel object for this Document	m_pHoopsModel = new HhoopstestModel();	m_pHoopsModel->Init();	if (!m_pHoopsModel)		return FALSE;	SetTitle(_T("虚拟实验室"));	return TRUE;}BOOL ChoopstestDoc::OnOpenDocument(LPCTSTR lpszPathName) {	if (!CHoopsDoc::OnOpenDocument(lpszPathName))		return FALSE;	// delete the HhoopstestView object if there is already one	POSITION pos = GetFirstViewPosition();	    	ChoopstestView *pView = (ChoopstestView*)GetNextView(pos);	if( pView )		pView->CleanUp();	// delete the HhoopstestModel object if there is already one	if(m_pHoopsModel)	{		delete m_pHoopsModel;		m_pHoopsModel = NULL;	}		// create a new HhoopstestModel object for this Document	m_pHoopsModel = new HhoopstestModel();	m_pHoopsModel->Init();	if (((HhoopstestModel *)m_pHoopsModel)->Read(H_ASCII_TEXT(lpszPathName)) != InputOK)		return FALSE;	return TRUE;}BOOL ChoopstestDoc::OnSaveDocument(LPCTSTR lpszPathName) {	// TODO: Add your specialized code here and/or call the base class		return CHoopsDoc::OnSaveDocument(lpszPathName);}/////////////////////////////////////////////////////////////////////////////// ChoopstestDoc diagnostics#ifdef _DEBUGvoid ChoopstestDoc::AssertValid() const{	CHoopsDoc::AssertValid();}void ChoopstestDoc::Dump(CDumpContext& dc) const{	CHoopsDoc::Dump(dc);}#endif //_DEBUG/////////////////////////////////////////////////////////////////////////////// ChoopstestDoc serializationvoid ChoopstestDoc::Serialize(CArchive& ar){	if (ar.IsStoring())	{		// TODO: add storing code here	}	else	{		// TODO: add loading code here	}}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -