base.h

来自「画一些简单的图元」· C头文件 代码 · 共 73 行

H
73
字号
// Base.h: interface for the CBase class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_BASE_H__7B9A162C_F785_4A3D_BEF7_4CFEA86E6464__INCLUDED_)
#define AFX_BASE_H__7B9A162C_F785_4A3D_BEF7_4CFEA86E6464__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class CBase : public CObject  
{
public:
	BOOL m_bStrech;

	CBase();
	virtual ~CBase();

	virtual	CRect GetRect();
	virtual	BOOL IsPointIn(CPoint point);
	virtual BOOL Draw(CDC* pDC);
	virtual BOOL StrechObject(CPoint point);
	// 	virtual bool IsPointIn(CPoint point);

	CPoint		m_ptStart;
	CPoint		m_ptEnd;
	int			m_nWidth;
	DWORD		m_dwColor;
	int 		m_nStyle;
	int			m_nStrechDir;	
	BOOL		m_bSelected;
};

class CLine : public CBase
{
public:
	virtual	BOOL IsPointIn(CPoint point);
	CLine();
	virtual ~CLine();
	
	virtual BOOL Draw(CDC* pDC);

	// 	virtual bool IsPointIn(CPoint point);
};


class CDrawRect : public CLine
{
public:
	virtual BOOL IsPointIn(CPoint point);
	
	CDrawRect();
	virtual ~CDrawRect();
	
	virtual BOOL Draw(CDC* pDC);

};

class CEllipse : public CDrawRect
{
public:
	BOOL IsPointIn(CPoint point);
	
	CEllipse();
	~CEllipse();
	
	virtual	BOOL Draw(CDC* pDC);

};

#endif // !defined(AFX_BASE_H__7B9A162C_F785_4A3D_BEF7_4CFEA86E6464__INCLUDED_)

⌨️ 快捷键说明

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