interfacedoc.cpp

来自「接口封装 封装 我的 电动 的哦 得得」· C++ 代码 · 共 107 行

CPP
107
字号
// InterfaceDoc.cpp : Implementierung der Klasse CInterfaceDoc
//

#include "stdafx.h"
#include "Interface.h"

#include "InterfaceDoc.h"

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

/////////////////////////////////////////////////////////////////////////////
// CInterfaceDoc

IMPLEMENT_DYNCREATE(CInterfaceDoc, CDocument)

BEGIN_MESSAGE_MAP(CInterfaceDoc, CDocument)
	//{{AFX_MSG_MAP(CInterfaceDoc)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CInterfaceDoc Konstruktion/Destruktion

CInterfaceDoc::CInterfaceDoc()
{
}

CInterfaceDoc::~CInterfaceDoc()
{
}

BOOL CInterfaceDoc::OnNewDocument()
{
	if (!CDocument::OnNewDocument())
		return FALSE;

	return TRUE;
}



/////////////////////////////////////////////////////////////////////////////
// CInterfaceDoc Serialisierung

void CInterfaceDoc::Serialize(CArchive& ar)
{
	if (ar.IsStoring())
	{
	}
	else
	{
		m_Strings.RemoveAll();

		int idx=0;
		CString t;

		TRY
		{
			while(ar.ReadString(t))
			{
				m_Strings.SetAtGrow(idx, t);
				idx++;
			}
		}
		CATCH(CArchiveException, e)
		{
#ifdef _DEBUG
			TCHAR   szCause[255];
			CString strFormatted;
			e->GetErrorMessage(szCause, 255);
			// (in real life, it's probably more
			// appropriate to read this from
			//  a string resource so it would be easy to
			// localize)
			strFormatted = _T("CArciveException: ");
			strFormatted += szCause;
			AfxMessageBox(strFormatted);   
#endif //_DEBUG
		}
		END_CATCH;

		UpdateAllViews(NULL);
	}
}

/////////////////////////////////////////////////////////////////////////////
// CInterfaceDoc Diagnose

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

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

/////////////////////////////////////////////////////////////////////////////
// CInterfaceDoc Befehle

⌨️ 快捷键说明

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