#pragma once


// CIconButton

class CIconButton : public CWnd
{

public:
	CIconButton();
	virtual ~CIconButton();

protected:
	DECLARE_MESSAGE_MAP()
public:
	afx_msg void OnPaint();

	int		Create(CWnd *par,CString text,UINT iconID,CPoint pt,int id);
	void	SetSelect(int sel);
	int		GetSelect();

private:
	CString	m_text;
	HICON	m_icon;
	HICON	m_select;
	int		m_isSelect;
	int		m_id;
	int		m_type;

	void DrawItem(int sel,int fover,int iconDraw=1);

	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
public:
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
protected:
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
};


