📄 draftview.cpp
字号:
// DraftView.cpp : implementation file
//
#include "stdafx.h"
#include "DVSDITest.h"
#include "DraftView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CDraftView
IMPLEMENT_DYNCREATE(CDraftView, CScrollView)
CDraftView::CDraftView()
{
}
CDraftView::~CDraftView()
{
}
BEGIN_MESSAGE_MAP(CDraftView, CScrollView)
//{{AFX_MSG_MAP(CDraftView)
// NOTE - the ClassWizard will add and remove mapping macros here.
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CDraftView drawing
void CDraftView::OnInitialUpdate()
{
CScrollView::OnInitialUpdate();
CSize sizeTotal;
// TODO: calculate the total size of this view
sizeTotal.cx = 200;
sizeTotal.cy = 1000;
SetScrollSizes(MM_TEXT, sizeTotal);
}
void CDraftView::OnDraw(CDC* pDC)
{
CDVSDITestDoc * pDoc = GetDocument();
// TODO: add draw code here
CRect rc;
GetClientRect(&rc);
CBrush br(pDoc->m_clr),*ob;
ob=pDC->SelectObject(&br);
pDC->Ellipse(&rc);
pDC->SelectObject(&ob);
br.DeleteObject();
}
/////////////////////////////////////////////////////////////////////////////
// CDraftView diagnostics
#ifdef _DEBUG
void CDraftView::AssertValid() const
{
CScrollView::AssertValid();
}
void CDraftView::Dump(CDumpContext& dc) const
{
CScrollView::Dump(dc);
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CDraftView message handlers
CDVSDITestDoc * CDraftView::GetDocument()
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CDVSDITestDoc)));
return (CDVSDITestDoc*)m_pDocument;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -