⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ele.h

📁 学习 MFC 基本用法和功能 以及MFC工作原理
💻 H
字号:
#pragma once

// CEle 命令目标

class CEle : public CObject
{
protected:
	COLORREF m_Color;
	int m_Pen;  //pen wodth
	CRect m_EnclosingRect;

	CEle();
public:
	
	virtual ~CEle();
	virtual void Draw(CDC* pDC){}

	CRect GetBoundRect();
};

class CLine :
	public CEle
{
protected:
	CLine(void);

	CPoint m_StartPo;
	CPoint m_EndPo;

public:
	~CLine(void);

	virtual void Draw(CDC* pDC);

	CLine(CPoint Start,CPoint End,COLORREF aColor);
};

class CRec :
	public CEle
{
protected:
	CRec(void);
public:
	~CRec(void);

public:
	CRec(CPoint Start, CPoint End, COLORREF aColor);
	virtual void Draw(CDC* pDC);
};

class CCir :
	public CEle
{
protected:
	CCir(void);
public:
	~CCir(void);
	virtual void Draw(CDC *pDC);
	CCir(CPoint Start,CPoint End,COLORREF aColor);
};

class CCurve :
	public CEle
{
protected:
	CCurve(void);
	CList<CPoint,CPoint&> m_PoList;
public:
	~CCurve(void);
	CCurve(CPoint FPo,CPoint ScPo,COLORREF aColor);
	virtual void Draw(CDC* pDC);

	void AddSeg(CPoint& aPoint);
};

class CDian :
	public CEle
{
protected:
	CDian(void);
	CList<CPoint,CPoint&> m_DPoList;

public:
	~CDian(void);

public:
	void AddSegDian(CPoint& aPoint);
	CDian(CPoint Start,CPoint Current,COLORREF aColor);
	virtual void Draw(CDC* pDC);
};

class CTuo :
	public CEle
{
protected:
	CTuo(void);
public:
	~CTuo(void);
public:
	CTuo(CPoint Start,CPoint End, COLORREF aColor);
	virtual void Draw(CDC *pDC);
};


⌨️ 快捷键说明

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