📄 drawview.cpp
字号:
// DrawView.cpp : implementation file
//
#include "stdafx.h"
#include "demo_devstudio.h"
#include "DrawView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CDrawView
IMPLEMENT_DYNCREATE(CDrawView, CView)
CDrawView::CDrawView()
{
}
CDrawView::~CDrawView()
{
}
BEGIN_MESSAGE_MAP(CDrawView, CView)
//{{AFX_MSG_MAP(CDrawView)
// NOTE - the ClassWizard will add and remove mapping macros here.
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CDrawView drawing
void CDrawView::OnDraw(CDC* pDC)
{
CDocument* pDoc = GetDocument();
// TODO: add draw code here
pDC->MoveTo(0,0);
pDC->LineTo(500,500);
}
void CDrawView::OnInitialUpdate()
{
CZoomView::OnInitialUpdate();
// TODO: Add your specialized code here and/or call the base class
}
BOOL CDrawView::OnEraseBkgnd(CDC* pDC)
{
CZoomView::OnEraseBkgnd(pDC);
// CBrush m_wndbrush;
// m_wndbrush.CreateSolidBrush(RGB(78,45,205));
// CRect rect;
// GetClientRect(rect);
// pDC->FillRect(&rect,&m_wndbrush);
// RedrawWindow();
// GetParentFrame()->RecalcLayout();
// ResizeParentToFit();
return TRUE;
}
/////////////////////////////////////////////////////////////////////////////
// CDrawView diagnostics
#ifdef _DEBUG
void CDrawView::AssertValid() const
{
CView::AssertValid();
}
void CDrawView::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CDrawView message handlers
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -