ex120800fview.cpp

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

CPP
110
字号
// Ex120800fView.cpp : implementation of the CEx120800fView class
//

#include "stdafx.h"
#include "Ex120800f.h"

#include "Ex120800fDoc.h"
#include "Ex120800fView.h"

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

/////////////////////////////////////////////////////////////////////////////
// CEx120800fView

IMPLEMENT_DYNCREATE(CEx120800fView, CEditView)

BEGIN_MESSAGE_MAP(CEx120800fView, CEditView)
	//{{AFX_MSG_MAP(CEx120800fView)
		// 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, CEditView::OnFilePrint)
	ON_COMMAND(ID_FILE_PRINT_DIRECT, CEditView::OnFilePrint)
	ON_COMMAND(ID_FILE_PRINT_PREVIEW, CEditView::OnFilePrintPreview)
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CEx120800fView construction/destruction

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

}

CEx120800fView::~CEx120800fView()
{
}

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

	BOOL bPreCreated = CEditView::PreCreateWindow(cs);
	cs.style &= ~(ES_AUTOHSCROLL|WS_HSCROLL);	// Enable word-wrapping

	return bPreCreated;
}

/////////////////////////////////////////////////////////////////////////////
// CEx120800fView drawing

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

/////////////////////////////////////////////////////////////////////////////
// CEx120800fView printing

BOOL CEx120800fView::OnPreparePrinting(CPrintInfo* pInfo)
{
	// default CEditView preparation
	return CEditView::OnPreparePrinting(pInfo);
}

void CEx120800fView::OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo)
{
	// Default CEditView begin printing.
	CEditView::OnBeginPrinting(pDC, pInfo);
}

void CEx120800fView::OnEndPrinting(CDC* pDC, CPrintInfo* pInfo)
{
	// Default CEditView end printing
	CEditView::OnEndPrinting(pDC, pInfo);
}

/////////////////////////////////////////////////////////////////////////////
// CEx120800fView diagnostics

#ifdef _DEBUG
void CEx120800fView::AssertValid() const
{
	CEditView::AssertValid();
}

void CEx120800fView::Dump(CDumpContext& dc) const
{
	CEditView::Dump(dc);
}

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

/////////////////////////////////////////////////////////////////////////////
// CEx120800fView message handlers

⌨️ 快捷键说明

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