ex120800aview.cpp

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

CPP
105
字号
// Ex120800aView.cpp : implementation of the CEx120800aView class
//

#include "stdafx.h"
#include "Ex120800a.h"

#include "Ex120800aDoc.h"
#include "Ex120800aView.h"

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

/////////////////////////////////////////////////////////////////////////////
// CEx120800aView

IMPLEMENT_DYNCREATE(CEx120800aView, CView)

BEGIN_MESSAGE_MAP(CEx120800aView, CView)
	//{{AFX_MSG_MAP(CEx120800aView)
		// 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()

/////////////////////////////////////////////////////////////////////////////
// CEx120800aView construction/destruction

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

}

CEx120800aView::~CEx120800aView()
{
}

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

	return CView::PreCreateWindow(cs);
}

/////////////////////////////////////////////////////////////////////////////
// CEx120800aView drawing

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

/////////////////////////////////////////////////////////////////////////////
// CEx120800aView printing

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

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

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

/////////////////////////////////////////////////////////////////////////////
// CEx120800aView diagnostics

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

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

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

/////////////////////////////////////////////////////////////////////////////
// CEx120800aView message handlers

⌨️ 快捷键说明

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