preprintdoc.cpp
来自「该程序用于实现类似于OFFICE的打印预览功能,用于特殊应用程序如财务管理系统的」· C++ 代码 · 共 89 行
CPP
89 行
// PrePrintDoc.cpp : implementation of the CPrePrintDoc class
//
#include "stdafx.h"
#include "PrePrint.h"
#include "PrePrintDoc.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CPrePrintDoc
IMPLEMENT_DYNCREATE(CPrePrintDoc, CDocument)
BEGIN_MESSAGE_MAP(CPrePrintDoc, CDocument)
//{{AFX_MSG_MAP(CPrePrintDoc)
// 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()
/////////////////////////////////////////////////////////////////////////////
// CPrePrintDoc construction/destruction
CPrePrintDoc::CPrePrintDoc()
{
// TODO: add one-time construction code here
}
CPrePrintDoc::~CPrePrintDoc()
{
}
BOOL CPrePrintDoc::OnNewDocument()
{
if (!CDocument::OnNewDocument())
return FALSE;
m_stringArray.SetSize(4);
m_stringArray[0]=" 111";
m_stringArray[1]=" 11111";
m_stringArray[2]=" 1111111";
m_stringArray[3]="1111111111";
// TODO: add reinitialization code here
// (SDI documents will reuse this document)
return TRUE;
}
/////////////////////////////////////////////////////////////////////////////
// CPrePrintDoc serialization
void CPrePrintDoc::Serialize(CArchive& ar)
{
//m_stringArray.Serialize(ar);
}
/////////////////////////////////////////////////////////////////////////////
// CPrePrintDoc diagnostics
#ifdef _DEBUG
void CPrePrintDoc::AssertValid() const
{
CDocument::AssertValid();
}
void CPrePrintDoc::Dump(CDumpContext& dc) const
{
CDocument::Dump(dc);
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CPrePrintDoc commands
void CPrePrintDoc::DeleteContents()
{
// TODO: Add your specialized code here and/or call the base class
m_stringArray.RemoveAll();
//CDocument::DeleteContents();
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?