📄 drawshape.h
字号:
#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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -