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

📄 datanodedoc.cpp

📁 组态数据结点,工控数据结构编程学习资料,源码或其他好源码或编程学习资料
💻 CPP
字号:
// treeDoc.cpp : implementation of the CDataNodeDoc class
//

#include "stdafx.h"
//#include "ProjectItem.h"

#include "WorkSpace.h"

//#include "WorkSpaceView.h"
#include "DataNodeDoc.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CDataNodeDoc

IMPLEMENT_DYNCREATE(CDataNodeDoc, CDocument)

BEGIN_MESSAGE_MAP(CDataNodeDoc, CDocument)
	//{{AFX_MSG_MAP(CDataNodeDoc)
		// 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()

/////////////////////////////////////////////////////////////////////////////
// CDataNodeDoc construction/destruction

// The document must initialize its 2 view pointers to 0.
CDataNodeDoc::CDataNodeDoc():
m_pListView(0)
{
}

CDataNodeDoc::~CDataNodeDoc()
{
}
#if 0
POSITION CDataNodeDoc::InsertData (CProjectItem &item)
{
	// No attempt is made here to keep the list ordered.
	// The tree view will take care of that.
	POSITION pos = m_ProjectList.AddTail(item);

	SetModifiedFlag();

	return pos;
}
#endif

BOOL CDataNodeDoc::OnNewDocument()
{
	if (!CDocument::OnNewDocument())
		return FALSE;
	
	// Even an empty document (in this app) has
	// something to display in the tree view.
	//m_pTreeView->PopulateTree();

	return TRUE;
}

void CDataNodeDoc::DeleteContents() 
{
	// Clear out everything from the document object's CList.
//	m_ProjectList.RemoveAll();
	
	CDocument::DeleteContents();
}

BOOL CDataNodeDoc::OnOpenDocument(LPCTSTR lpszPathName) 
{
	if (!CDocument::OnOpenDocument(lpszPathName))
		return FALSE;
	
	// Now that the document is open and its CList object
	// has been deserialized, display the data in the tree view.
	//m_pTreeView->PopulateTree();
	
	return TRUE;
}
/////////////////////////////////////////////////////////////////////////////
// CDataNodeDoc serialization

// This helper function, which is not a member of any class,
// is needed by the CList object in the document class. Without it,
// CProjectItem's Serialize function won't be called. When called
// for a CList, nCount is always 1. 

// The default SerializeElements called by CList does a bit-wise
// read/write, which won't work for CProjectItem's CString members.

//void AFXAPI SerializeElements(CArchive& ar, CProjectItem * pMyData, int nCount)
//{
//	pMyData->Serialize(ar);
//}

void CDataNodeDoc::Serialize(CArchive& ar)
{
//	m_ProjectList.Serialize(ar);
}

/////////////////////////////////////////////////////////////////////////////
// CDataNodeDoc diagnostics

#ifdef _DEBUG
void CDataNodeDoc::AssertValid() const
{
	CDocument::AssertValid();
}

void CDataNodeDoc::Dump(CDumpContext& dc) const
{
	CDocument::Dump(dc);
}
#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////
// CDataNodeDoc commands

⌨️ 快捷键说明

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