drawshape.h
来自「一个跟Cppunit一样好用的单元测试工具」· C头文件 代码 · 共 56 行
H
56 行
#ifndef _DRAWSHAPE_H_
#define _DRAWSHAPE_H_
class CShape: public CObject
{
public:
CShape();
virtual ~CShape();
virtual void Draw(CDC *pdc);
void SetStart(CPoint pt);
void SetEnd(CPoint pt);
void SetWidth(UINT width);
void SetColor(COLORREF color);
protected:
CPoint m_ptStart;
CPoint m_ptEnd;
UINT m_nPenWidth;
COLORREF m_Color;
};
class CLine: public CShape
{
public:
CLine();
~CLine();
virtual void Draw(CDC *pdc);
};
class CCircle: public CShape
{
public:
CCircle();
~CCircle();
virtual void Draw(CDC *pdc);
};
class CRectangle: public CShape
{
public:
CRectangle();
~CRectangle();
virtual void Draw(CDC *pdc);
};
class CText: public CShape
{
public:
CText();
~CText();
virtual void Draw(CDC *pdc);
public:
CString m_strText;
};
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?