📄 s10_1view.cpp
字号:
// s10_1View.cpp : implementation of the CS10_1View class
//
#include "stdafx.h"
#include "s10_1.h"
#include "s10_1Doc.h"
#include "s10_1View.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CS10_1View
IMPLEMENT_DYNCREATE(CS10_1View, CView)
BEGIN_MESSAGE_MAP(CS10_1View, CView)
//{{AFX_MSG_MAP(CS10_1View)
ON_WM_PAINT()
//}}AFX_MSG_MAP
// Standard printing commands
ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CS10_1View construction/destruction
CS10_1View::CS10_1View()
{
// TODO: add construction code here
}
CS10_1View::~CS10_1View()
{
}
BOOL CS10_1View::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return CView::PreCreateWindow(cs);
}
/////////////////////////////////////////////////////////////////////////////
// CS10_1View drawing
void CS10_1View::OnDraw(CDC* pDC)
{
CS10_1Doc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
}
/////////////////////////////////////////////////////////////////////////////
// CS10_1View printing
BOOL CS10_1View::OnPreparePrinting(CPrintInfo* pInfo)
{
// default preparation
return DoPreparePrinting(pInfo);
}
void CS10_1View::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add extra initialization before printing
}
void CS10_1View::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add cleanup after printing
}
/////////////////////////////////////////////////////////////////////////////
// CS10_1View diagnostics
#ifdef _DEBUG
void CS10_1View::AssertValid() const
{
CView::AssertValid();
}
void CS10_1View::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
CS10_1Doc* CS10_1View::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CS10_1Doc)));
return (CS10_1Doc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CS10_1View message handlers
void CS10_1View::OnPaint()
{
CPaintDC dc(this); // device context for painting
// TODO: Add your message handler code here
CRect oRectangle; // 定义矩形区域对象
GetClientRect(&oRectangle); // 由oRectangle返回客户区
dc.Ellipse(oRectangle); // 在客户区画一个椭圆
// Do not call CView::OnPaint() for painting messages
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -