#pragma once


// CIconButton2

class CIconButton2 : public CWnd
{

public:
	CIconButton2();
	virtual ~CIconButton2();

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

	int		Create(CWnd *par,CString text,UINT iconID,CPoint pt,int id,int leftLine=0);
	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;
	int		m_leftLine;
	int		m_tracking;

	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);
public:
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
};


