ex120800bview.cpp

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

CPP
105
字号
// Ex120800bView.cpp : implementation of the CEx120800bView class
//

#include "stdafx.h"
#include "Ex120800b.h"

#include "Ex120800bDoc.h"
#include "Ex120800bView.h"

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

/////////////////////////////////////////////////////////////////////////////
// CEx120800bView

IMPLEMENT_DYNCREATE(CEx120800bView, CView)

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

/////////////////////////////////////////////////////////////////////////////
// CEx120800bView construction/destruction

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

}

CEx120800bView::~CEx120800bView()
{
}

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

	return CView::PreCreateWindow(cs);
}

/////////////////////////////////////////////////////////////////////////////
// CEx120800bView drawing

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

/////////////////////////////////////////////////////////////////////////////
// CEx120800bView printing

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

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

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

/////////////////////////////////////////////////////////////////////////////
// CEx120800bView diagnostics

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

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

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

/////////////////////////////////////////////////////////////////////////////
// CEx120800bView message handlers

⌨️ 快捷键说明

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