miscview.cpp

来自「API经典入门」· C++ 代码 · 共 76 行

CPP
76
字号
// miscview.cpp : implementation of the CMiscView class
//

#include "stdafx.h"
#include "misc.h"

#include "miscdoc.h"
#include "miscview.h"

#include "locale.h"

#ifdef _DEBUG
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CMiscView

IMPLEMENT_DYNCREATE(CMiscView, CView)

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

/////////////////////////////////////////////////////////////////////////////
// CMiscView construction/destruction

CMiscView::CMiscView()
{
	// TODO: add construction code here
}

CMiscView::~CMiscView()
{
}

/////////////////////////////////////////////////////////////////////////////
// CMiscView drawing

void CMiscView::OnDraw(CDC* pDC)
{
	CMiscDoc* pDoc = GetDocument();
	ASSERT_VALID(pDoc);
	
	pDC-> TextOut(20, 20, "This is the Miscellany Testing program");

}

/////////////////////////////////////////////////////////////////////////////
// CMiscView diagnostics

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

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

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

/////////////////////////////////////////////////////////////////////////////
// CMiscView message handlers

⌨️ 快捷键说明

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