ex010105view.cpp

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

CPP
105
字号
// Ex010105View.cpp : implementation of the CEx010105View class
//

#include "stdafx.h"
#include "Ex010105.h"

#include "Ex010105Doc.h"
#include "Ex010105View.h"

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

/////////////////////////////////////////////////////////////////////////////
// CEx010105View

IMPLEMENT_DYNCREATE(CEx010105View, CView)

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

/////////////////////////////////////////////////////////////////////////////
// CEx010105View construction/destruction

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

}

CEx010105View::~CEx010105View()
{
}

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

	return CView::PreCreateWindow(cs);
}

/////////////////////////////////////////////////////////////////////////////
// CEx010105View drawing

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

/////////////////////////////////////////////////////////////////////////////
// CEx010105View printing

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

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

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

/////////////////////////////////////////////////////////////////////////////
// CEx010105View diagnostics

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

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

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

/////////////////////////////////////////////////////////////////////////////
// CEx010105View message handlers

⌨️ 快捷键说明

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