📄 drawcircleview.h
字号:
// DrawCircleView.h : interface of the CDrawCircleView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_DRAWCIRCLEVIEW_H__D78C7DF3_0B21_447D_ACF6_65DA47720C33__INCLUDED_)
#define AFX_DRAWCIRCLEVIEW_H__D78C7DF3_0B21_447D_ACF6_65DA47720C33__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class CDrawCircleView : public CView
{
protected: // create from serialization only
CDrawCircleView();
DECLARE_DYNCREATE(CDrawCircleView)
// Attributes
public:
CDrawCircleDoc* GetDocument();
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CDrawCircleView)
public:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
//}}AFX_VIRTUAL
// Implementation
public:
void CalcCirclePointBuf();
void DrawCircleBuf(CDC* pDC);
LPPOINT m_lpCircleBuf;
int m_nPointCount;
HCURSOR m_hCross;
BOOL m_bDoDrawCircle;
BOOL RunRockey(WORD& A, WORD& B, WORD& C, WORD& D);
void DrawCircleMidPoint_Rockey(CDC *pDC, int iCenterX, int iCenterY, int r);
int m_iDrawMethod;
void DrawCircleMidPoint_SoftRockey(CDC *pDC, int iCenterX, int iCenterY, int r);
BOOL RunSoftRockey(WORD& p1,WORD& p2,WORD& p3,WORD& p4);
int m_iOrgX,m_iOrgY;
int m_iPosX,m_iPosY,m_iRadius;
void SetPixelRel(CDC *pDC,int x,int y,COLORREF clPixel=RGB(0,0,0));
void CirclePlotPoints(CDC *pDC,int iCenterX,int iCenterY,int x,int y);
void DrawCircleMidPoint(CDC* pDC,int iCenterX,int iCenterY,int r);
void DrawAxis(CDC* pDC);
virtual ~CDrawCircleView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
//{{AFX_MSG(CDrawCircleView)
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnSetupDrawparam();
afx_msg void OnSetupDrawmethod();
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnDoDrawCircle();
afx_msg void OnUpdateDoDrawCircle(CCmdUI* pCmdUI);
afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnDestroy();
afx_msg void OnUpdateSetupDrawparam(CCmdUI* pCmdUI);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in DrawCircleView.cpp
inline CDrawCircleDoc* CDrawCircleView::GetDocument()
{ return (CDrawCircleDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_DRAWCIRCLEVIEW_H__D78C7DF3_0B21_447D_ACF6_65DA47720C33__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -