⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 test18view.cpp

📁 这是书上的代码
💻 CPP
字号:
// Test18View.cpp : implementation of the CTest18View class
//

#include "stdafx.h"
#include "Test18.h"

#include "Test18Doc.h"
#include "Test18View.h"

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

/////////////////////////////////////////////////////////////////////////////
// CTest18View

IMPLEMENT_DYNCREATE(CTest18View, CView)

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

/////////////////////////////////////////////////////////////////////////////
// CTest18View construction/destruction

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

}

CTest18View::~CTest18View()
{
}

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

	return CView::PreCreateWindow(cs);
}

/////////////////////////////////////////////////////////////////////////////
// CTest18View drawing

void CTest18View::OnDraw(CDC* pDC)
{
	CTest18Doc* pDoc = GetDocument();
	ASSERT_VALID(pDoc);
	// TODO: add draw code for native data here
	pDC->TextOut(10, 10, "一个程序的单个运行实例测试");	
}

/////////////////////////////////////////////////////////////////////////////
// CTest18View diagnostics

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

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

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

/////////////////////////////////////////////////////////////////////////////
// CTest18View message handlers

⌨️ 快捷键说明

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