DrawCircle.h
资源名称:DrawSys.zip [点击查看]
上传用户:mosfetic
上传日期:2022-06-16
资源大小:4612k
文件大小:1k
源码类别:
GDI/图象编程
开发平台:
Visual C++
- // DrawCircle.h: interface for the CDrawCircle class.
- //
- //////////////////////////////////////////////////////////////////////
- #if !defined(AFX_DRAWCIRCLE_H__7AB8EBE7_0B13_4A03_BDBB_2438BC89749C__INCLUDED_)
- #define AFX_DRAWCIRCLE_H__7AB8EBE7_0B13_4A03_BDBB_2438BC89749C__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- #include "DrawShape.h"
- class CDrawCircle : public CDrawShape
- {
- DECLARE_SERIAL(CDrawCircle)
- private:
- CPoint m_ptCenter;
- LONG m_nRadius;
- CPoint m_ptTemp;
- BOOL m_bStart;
- public:
- CDrawCircle();
- virtual ~CDrawCircle();
- virtual void Draw(CDC* pDC);
- virtual void OnMouseMove(CDC* pDC, UINT nFlags, CPoint point);
- virtual void OnLButtonDown(CDC* pDC, UINT nFlags, CPoint point);
- virtual BOOL OnLButtonUp(CDC* pDC, UINT nFlags, CPoint point);
- virtual void Serialize(CArchive& ar);
- virtual BOOL PtInShape(CPoint point);
- virtual void ShowProperty();
- private:
- LONG CalcRadius(CPoint& ptFirst, CPoint& ptSecond);
- };
- #endif // !defined(AFX_DRAWCIRCLE_H__7AB8EBE7_0B13_4A03_BDBB_2438BC89749C__INCLUDED_)