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

📄 preprintdoc.cpp

📁 该程序用于实现类似于OFFICE的打印预览功能,用于特殊应用程序如财务管理系统的打印预览功能
💻 CPP
字号:
// 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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -