circle.h

来自「Visual C++编程宝典随书光盘里的代码」· C头文件 代码 · 共 55 行

H
55
字号
// circle.h: interface of the CPaintCircle and CPaintEllipse classes
//
/////////////////////////////////////////////////////////////////////////////

class CPaintCircle : public CPainted
{
public:
	CPaintCircle(BOOL bFilled);
	CPaintCircle() { };

  	void Draw(CDC* pCDC);
	void DragDraw(CDC* pDC, CPoint& pointDragged);
	void DrawSelected(CDC* pDC);

	void OnDown(CPoint& pointDown);
	void OnUp(CPoint& pointUp, CWnd* pWnd);
	BOOL IsHit(CPoint& pointBang);
	void GetBoundingRect(CRect* pRect);

	void Serialize(CArchive& ar);

protected:
	DECLARE_SERIAL(CPaintCircle)

	CPoint m_pointLower;
	COLORREF m_rgbInside;
	BOOL m_bFilled;
};


class CPaintEllipse : public CPainted
{
public:
	CPaintEllipse(BOOL bFilleds);
	CPaintEllipse() { };

  	void Draw(CDC* pCDC);
	void DragDraw(CDC* pDC, CPoint& pointDragged);
	void DrawSelected(CDC* pDC);

	void OnDown(CPoint& pointDown);
	void OnUp(CPoint& pointUp, CWnd* pWnd);
	BOOL IsHit(CPoint& pointBang);
	void GetBoundingRect(CRect* pRect);

	void Serialize(CArchive& ar);

protected:
	DECLARE_SERIAL(CPaintEllipse)

	COLORREF m_rgbInside;
	CPoint m_pointLower;
	BOOL m_bFilled;
};

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?