ex030205view.cpp

来自「深入浅出Visual C++入门进阶与应用实例 随书光盘 作者 何志丹」· C++ 代码 · 共 105 行

CPP
105
字号
// Ex030205View.cpp : implementation of the CEx030205View class
//

#include "stdafx.h"
#include "Ex030205.h"

#include "Ex030205Doc.h"
#include "Ex030205View.h"

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

/////////////////////////////////////////////////////////////////////////////
// CEx030205View

IMPLEMENT_DYNCREATE(CEx030205View, CView)

BEGIN_MESSAGE_MAP(CEx030205View, CView)
	//{{AFX_MSG_MAP(CEx030205View)
		// 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
	// Standard printing commands
	ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
	ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
	ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CEx030205View construction/destruction

CEx030205View::CEx030205View()
{
	// TODO: add construction code here

}

CEx030205View::~CEx030205View()
{
}

BOOL CEx030205View::PreCreateWindow(CREATESTRUCT& cs)
{
	// TODO: Modify the Window class or styles here by modifying
	//  the CREATESTRUCT cs

	return CView::PreCreateWindow(cs);
}

/////////////////////////////////////////////////////////////////////////////
// CEx030205View drawing

void CEx030205View::OnDraw(CDC* pDC)
{
	CEx030205Doc* pDoc = GetDocument();
	ASSERT_VALID(pDoc);
	// TODO: add draw code for native data here
}

/////////////////////////////////////////////////////////////////////////////
// CEx030205View printing

BOOL CEx030205View::OnPreparePrinting(CPrintInfo* pInfo)
{
	// default preparation
	return DoPreparePrinting(pInfo);
}

void CEx030205View::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
	// TODO: add extra initialization before printing
}

void CEx030205View::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
	// TODO: add cleanup after printing
}

/////////////////////////////////////////////////////////////////////////////
// CEx030205View diagnostics

#ifdef _DEBUG
void CEx030205View::AssertValid() const
{
	CView::AssertValid();
}

void CEx030205View::Dump(CDumpContext& dc) const
{
	CView::Dump(dc);
}

CEx030205Doc* CEx030205View::GetDocument() // non-debug version is inline
{
	ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CEx030205Doc)));
	return (CEx030205Doc*)m_pDocument;
}
#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////
// CEx030205View message handlers

⌨️ 快捷键说明

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