?? yuanview.cpp
字號:
// YuanView.cpp : implementation of the CYuanView class
//
#include "stdafx.h"
#include "Yuan.h"
#include "YuanDoc.h"
#include "YuanView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CYuanView
IMPLEMENT_DYNCREATE(CYuanView, CView)
BEGIN_MESSAGE_MAP(CYuanView, CView)
//{{AFX_MSG_MAP(CYuanView)
ON_COMMAND(ID_ELL, OnEll)
ON_COMMAND(ID_ROUND, OnRound)
//}}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()
/////////////////////////////////////////////////////////////////////////////
// CYuanView construction/destruction
CYuanView::CYuanView()
{
// TODO: add construction code here
}
CYuanView::~CYuanView()
{
}
BOOL CYuanView::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return CView::PreCreateWindow(cs);
}
/////////////////////////////////////////////////////////////////////////////
// CYuanView drawing
void CYuanView::OnDraw(CDC* pDC)
{
CYuanDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
}
/////////////////////////////////////////////////////////////////////////////
// CYuanView printing
BOOL CYuanView::OnPreparePrinting(CPrintInfo* pInfo)
{
// default preparation
return DoPreparePrinting(pInfo);
}
void CYuanView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add extra initialization before printing
}
void CYuanView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add cleanup after printing
}
/////////////////////////////////////////////////////////////////////////////
// CYuanView diagnostics
#ifdef _DEBUG
void CYuanView::AssertValid() const
{
CView::AssertValid();
}
void CYuanView::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
CYuanDoc* CYuanView::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CYuanDoc)));
return (CYuanDoc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CYuanView message handlers
void CYuanView::OnEll()
{
// TODO: Add your command handler code here
RedrawWindow();//自動重畫窗口
CClientDC dc(this);
dc.Ellipse(120,100,280,210);
}
void CYuanView::OnRound()
{
// TODO: Add your command handler code here
RedrawWindow();//自動重畫窗口
CClientDC dc(this);
dc.Ellipse(100,100,280,280);
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -