📄 anotherview.cpp
字号:
// AnotherView.cpp : implementation file
//
#include "stdafx.h"
#include "TestDoc.h"
#include "AnotherView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CAnotherView
IMPLEMENT_DYNCREATE(CAnotherView, CView)
CAnotherView::CAnotherView()
{
}
CAnotherView::~CAnotherView()
{
}
BEGIN_MESSAGE_MAP(CAnotherView, CView)
//{{AFX_MSG_MAP(CAnotherView)
// NOTE - the ClassWizard will add and remove mapping macros here.
ON_WM_MOUSEMOVE()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CAnotherView drawing
void CAnotherView::OnDraw(CDC* pDC)
{
CDocument* pDoc = GetDocument();
// TODO: add draw code here
if(!m_strContent.IsEmpty())
pDC->ExtTextOut(m_ptContent.x, m_ptContent.y, ETO_OPAQUE, NULL, m_strContent, m_strContent.GetLength(), NULL);
}
/////////////////////////////////////////////////////////////////////////////
// CAnotherView diagnostics
#ifdef _DEBUG
void CAnotherView::AssertValid() const
{
CView::AssertValid();
}
void CAnotherView::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CAnotherView message handlers
void CAnotherView::OnMouseMove(UINT nFlags, CPoint lParam)
{
m_ptContent = lParam;
m_strContent = "Hello world!";
Invalidate();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -