📄 hellovw.cpp
字号:
// hellovw.cpp : implementation of the CHelloView class
//
#include "stdafx.h"
#include "hello.h"
#include "hellodoc.h"
#include "hellovw.h"
#ifdef _DEBUG
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CHelloView
IMPLEMENT_DYNCREATE(CHelloView, CView)
BEGIN_MESSAGE_MAP(CHelloView, CView)
//{{AFX_MSG_MAP(CHelloView)
// 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()
/////////////////////////////////////////////////////////////////////////////
// CHelloView construction/destruction
CHelloView::CHelloView()
{
// TODO: add construction code here
}
CHelloView::~CHelloView()
{
}
/////////////////////////////////////////////////////////////////////////////
// CHelloView drawing
void CHelloView::OnDraw(CDC* pDC)
{
//CHelloDoc* pDoc = GetDocument();
//ASSERT_VALID(pDoc);
pDC->TextOut(0, 0, "Hello World");
}
/////////////////////////////////////////////////////////////////////////////
// CHelloView diagnostics
#ifdef _DEBUG
void CHelloView::AssertValid() const
{
CView::AssertValid();
}
void CHelloView::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
CHelloDoc* CHelloView::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CHelloDoc)));
return (CHelloDoc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CHelloView message handlers
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -