// MenuIcon.h: interface for the CMenuIcon class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_MENUICON_H__0CA8D3CB_01C8_422C_8FE9_B7EB0B3B2B68__INCLUDED_)
#define AFX_MENUICON_H__0CA8D3CB_01C8_422C_8FE9_B7EB0B3B2B68__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
const int MAX_MENUCOUNT = 60,ITEMHEIGHT = 26,ITEMWIDTH= 120; //菜单项数量

/************************************
   CMenuItem结构用于记录菜单项信息
************************************/
struct CMenuItem
{
	CString m_ItemText;		//菜单项文本
	int		m_IconIndex;	//菜单项索引
	int		m_ItemID;		//菜单标记 -1顶层菜单,0分隔条,其他普通菜单项
};

class CMenuIcon : public CMenu 
{
public:
	void DrawComMenu(CDC* pDC,CRect Rect, BOOL Selected );
	void DrawTopMenu(CDC* pDC,CRect Rect,BOOL Selected );
	void DrawSeparater(CDC* pDC,CRect Rect);
	void DrawItemIcon(CDC* pDC,CRect Rect,int Icon );
	void DrawItemText(CDC* pDC,LPSTR Str,CRect Rect);
	BOOL MenuItem(CMenu* pMenu);
	BOOL AttatchMenu(UINT m_uID);
	CMenuIcon();
	virtual ~CMenuIcon();
	CMenuItem	m_ItemLists[MAX_MENUCOUNT];	//菜单项信息
	int			m_Index;					//临时索引
	int			m_IconIndex;				//菜单项图标索引
	CImageList	m_ImageList;				//存储菜单项图标

	virtual void MeasureItem( LPMEASUREITEMSTRUCT lpStruct );	//设置菜单项大小
	virtual void DrawItem( LPDRAWITEMSTRUCT lpStruct );			//重绘菜单项
};

#endif // !defined(AFX_MENUICON_H__0CA8D3CB_01C8_422C_8FE9_B7EB0B3B2B68__INCLUDED_)
