www.gusucode.com > 几个VC++打印小例子-源码程序 > 几个VC++打印小例子-源码程序/code/VC_PrintTest/VC_PrintTestDoc.cpp

    // VC_PrintTestDoc.cpp : implementation of the CVC_PrintTestDoc class
// Download by http://www.NewXing.com

#include "stdafx.h"
#include "VC_PrintTest.h"

#include "VC_PrintTestDoc.h"

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

/////////////////////////////////////////////////////////////////////////////
// CVC_PrintTestDoc

IMPLEMENT_DYNCREATE(CVC_PrintTestDoc, CDocument)

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

/////////////////////////////////////////////////////////////////////////////
// CVC_PrintTestDoc construction/destruction

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

}

CVC_PrintTestDoc::~CVC_PrintTestDoc()
{
}

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

	((CEditView*)m_viewList.GetHead())->SetWindowText(NULL);

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

	return TRUE;
}



/////////////////////////////////////////////////////////////////////////////
// CVC_PrintTestDoc serialization

void CVC_PrintTestDoc::Serialize(CArchive& ar)
{
	// CEditView contains an edit control which handles all serialization
	((CEditView*)m_viewList.GetHead())->SerializeRaw(ar);
}

/////////////////////////////////////////////////////////////////////////////
// CVC_PrintTestDoc diagnostics

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

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

/////////////////////////////////////////////////////////////////////////////
// CVC_PrintTestDoc commands