LineMenu.h
资源名称:44757463.rar [点击查看]
上传用户:lj3531212
上传日期:2007-06-18
资源大小:346k
文件大小:1k
源码类别:
绘图程序
开发平台:
Visual C++
- // LineMenu.h: interface for the CLineMenu class.
- //
- //////////////////////////////////////////////////////////////////////
- #if !defined(AFX_LINEMENU_H__01F4A873_6CF2_4631_B49E_028A19756A05__INCLUDED_)
- #define AFX_LINEMENU_H__01F4A873_6CF2_4631_B49E_028A19756A05__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- #include "GraphSoft.h"
- #include "afxtempl.h"
- #include "MenuEx.h"
- //////////////////////////////////////////////////////////////////////
- //////////////////////////////////////////////////////////////////////
- class CLineMenu : public CMenu
- {
- public:
- CLineMenu();
- virtual ~CLineMenu();
- public:
- void MeasureItem(LPMEASUREITEMSTRUCT lpMIS);
- void DrawItem(LPDRAWITEMSTRUCT lpDIS);
- void ChangeStyle(CMenu* pMenu);
- void DrawLine(CDC *pDC, int xf,int yf,int xT,int yT, BOOL bSelected, BOOL bGrayed, int nWidth);
- void DrawText(CDC *pDC, CRect &rtMenu,CRect rtText,BOOL bSelected, BOOL bGrayed, CString strText);
- void GrayString(CDC *pDC, const CString &str, const CRect rect);
- void SetTransparent(int i);
- protected:
- float StrToFloat(CString str);
- private:
- int m_nSeparatorHeight;//the height of the Separator item
- int m_nLineLength;//the length of line
- COLORREF m_colTextSelected;
- COLORREF m_colText;
- COLORREF m_colMenu;
- int m_nHeight;
- bool m_bGrayed;
- CList<MENUITEM *,MENUITEM *> m_ListMenu;//member for save and delete
- };
- #endif // !defined(AFX_LINEMENU_H__01F4A873_6CF2_4631_B49E_028A19756A05__INCLUDED_)