📄 myprin~1.cpp
字号:
// MyPrintDoc.cpp : implementation of the CMyPrintDoc class
//
#include "stdafx.h"
#include "MyPrint.h"
#include "MyPrintDoc.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CMyPrintDoc
IMPLEMENT_DYNCREATE(CMyPrintDoc, CDocument)
BEGIN_MESSAGE_MAP(CMyPrintDoc, CDocument)
//{{AFX_MSG_MAP(CMyPrintDoc)
// 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()
/////////////////////////////////////////////////////////////////////////////
// CMyPrintDoc construction/destruction
CMyPrintDoc::CMyPrintDoc()
{
// TODO: add one-time construction code here
}
CMyPrintDoc::~CMyPrintDoc()
{
}
BOOL CMyPrintDoc::OnNewDocument()
{
if (!CDocument::OnNewDocument())
return FALSE;
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";
// TODO: add reinitialization code here
// (SDI documents will reuse this document)
return TRUE;
}
/////////////////////////////////////////////////////////////////////////////
// CMyPrintDoc serialization
void CMyPrintDoc::Serialize(CArchive& ar)
{
if (ar.IsStoring())
{
// TODO: add storing code here
}
else
{
// TODO: add loading code here
}
m_stringArray.Serialize(ar);
}
/////////////////////////////////////////////////////////////////////////////
// CMyPrintDoc diagnostics
#ifdef _DEBUG
void CMyPrintDoc::AssertValid() const
{
CDocument::AssertValid();
}
void CMyPrintDoc::Dump(CDumpContext& dc) const
{
CDocument::Dump(dc);
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CMyPrintDoc commands
void CMyPrintDoc::DeleteContents()
{
m_stringArray.RemoveAll();
CDocument::DeleteContents();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -