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

📄 seeprintdoc.cpp

📁 MFC入门小程序源代码
💻 CPP
字号:
// SeePrintDoc.cpp : implementation of the CSeePrintDoc class
//

#include "stdafx.h"
#include "SeePrint.h"

#include "SeePrintDoc.h"

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

/////////////////////////////////////////////////////////////////////////////
// CSeePrintDoc

IMPLEMENT_DYNCREATE(CSeePrintDoc, CDocument)

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

/////////////////////////////////////////////////////////////////////////////
// CSeePrintDoc construction/destruction

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

}

CSeePrintDoc::~CSeePrintDoc()
{
}

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

// added by yhm 
	m_stringArray.SetSize(10);
	m_stringArray[0]="aaaaaaaaaaaaaaaaa";
	m_stringArray[1]="bbbbbbbbbbbbbbbbb";
	m_stringArray[2]="ccccccccccccccccc";
	m_stringArray[3]="ddddddddddddddddd";
	m_stringArray[4]="eeeeeeeeeeeeeeeee";
	m_stringArray[5]="fffffffffffffffff";
	m_stringArray[6]="ggggggggggggggggg";
	m_stringArray[7]="hhhhhhhhhhhhhhhhh";
	m_stringArray[8]="iiiiiiiiiiiiiiiii";
	m_stringArray[9]="jjjjjjjjjjjjjjjjj";
// added by yhm 

	// TODO: add reinitialization code here
	// (SDI documents will reuse this document)

	return TRUE;
}



/////////////////////////////////////////////////////////////////////////////
// CSeePrintDoc serialization

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

	m_stringArray.Serialize(ar);//added by yhm

}

/////////////////////////////////////////////////////////////////////////////
// CSeePrintDoc diagnostics

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

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

/////////////////////////////////////////////////////////////////////////////
// CSeePrintDoc commands

void CSeePrintDoc::DeleteContents() 
{
	// TODO: Add your specialized code here and/or call the base class
	
	m_stringArray.RemoveAll();//added by yhm

	CDocument::DeleteContents();
}

⌨️ 快捷键说明

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