ex_mulviewdoc.cpp

来自「一系列的c++例子 一步一步由浅入深 有 聊天室」· C++ 代码 · 共 87 行

CPP
87
字号
// Ex_MulViewDoc.cpp : implementation of the CEx_MulViewDoc class
//

#include "stdafx.h"
#include "Ex_MulView.h"

#include "Ex_MulViewDoc.h"

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

/////////////////////////////////////////////////////////////////////////////
// CEx_MulViewDoc

IMPLEMENT_DYNCREATE(CEx_MulViewDoc, CDocument)

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

/////////////////////////////////////////////////////////////////////////////
// CEx_MulViewDoc construction/destruction

CEx_MulViewDoc::CEx_MulViewDoc()
{
	// TODO: add one-time construction code here

}

CEx_MulViewDoc::~CEx_MulViewDoc()
{
}

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

	m_string.SetSize(3,1);
	m_string[0]="Here is SDI program";
	m_string[1]="It has one document";
	m_string[2]="but it has two switchable view";

	return TRUE;
}



/////////////////////////////////////////////////////////////////////////////
// CEx_MulViewDoc serialization

void CEx_MulViewDoc::Serialize(CArchive& ar)
{
	if (ar.IsStoring())
	{
		// TODO: add storing code here
	}
	else
	{
		// TODO: add loading code here
	}
}

/////////////////////////////////////////////////////////////////////////////
// CEx_MulViewDoc diagnostics

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

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

/////////////////////////////////////////////////////////////////////////////
// CEx_MulViewDoc commands

⌨️ 快捷键说明

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