📄 aview.cpp
字号:
// AView.cpp : implementation file
//
#include "stdafx.h"
#include "玻璃划分程序.h"
#include "AView.h"
#include "玻璃划分程序Doc.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CAView
IMPLEMENT_DYNCREATE(CAView, CView)
CAView::CAView()
{
}
CAView::~CAView()
{
}
BEGIN_MESSAGE_MAP(CAView, CView)
//{{AFX_MSG_MAP(CAView)
// NOTE - the ClassWizard will add and remove mapping macros here.
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CAView drawing
void CAView::OnDraw(CDC* pDC)
{
CMyDoc* pDoc =(CMyDoc*)GetDocument();
pDC->SetTextColor(RGB(255,0,0));
pDC->Rectangle(0,0,pDoc->m_width,pDoc->m_length);
CString str ;
str.Format("长 = %f 宽 = %f ",pDoc->m_length,pDoc->m_width);
pDC->TextOut(10,10+pDoc->m_length,str);
// TODO: add draw code here
}
/////////////////////////////////////////////////////////////////////////////
// CAView diagnostics
#ifdef _DEBUG
void CAView::AssertValid() const
{
CView::AssertValid();
}
void CAView::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CAView message handlers
void CAView::OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint)
{
// TODO: Add your specialized code here and/or call the base class
CDC* pDC=GetDC();
CAView::OnDraw(pDC);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -