LineMenu.h
上传用户:lj3531212
上传日期:2007-06-18
资源大小:346k
文件大小:1k
源码类别:

绘图程序

开发平台:

Visual C++

  1. // LineMenu.h: interface for the CLineMenu class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_LINEMENU_H__01F4A873_6CF2_4631_B49E_028A19756A05__INCLUDED_)
  5. #define AFX_LINEMENU_H__01F4A873_6CF2_4631_B49E_028A19756A05__INCLUDED_
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. #include "GraphSoft.h"
  10. #include "afxtempl.h"
  11. #include "MenuEx.h"
  12. //////////////////////////////////////////////////////////////////////
  13. //////////////////////////////////////////////////////////////////////
  14. class CLineMenu : public CMenu  
  15. {
  16. public:
  17. CLineMenu();
  18. virtual ~CLineMenu();
  19. public:
  20. void MeasureItem(LPMEASUREITEMSTRUCT  lpMIS);
  21. void DrawItem(LPDRAWITEMSTRUCT lpDIS);
  22. void ChangeStyle(CMenu* pMenu);
  23.     void DrawLine(CDC *pDC, int xf,int yf,int xT,int yT, BOOL bSelected, BOOL bGrayed, int nWidth);
  24.     void DrawText(CDC *pDC, CRect &rtMenu,CRect rtText,BOOL bSelected, BOOL bGrayed, CString strText);
  25.     void GrayString(CDC *pDC, const CString &str, const CRect rect);
  26. void SetTransparent(int i);
  27. protected:
  28. float StrToFloat(CString str);
  29. private:
  30. int m_nSeparatorHeight;//the height of the Separator item
  31. int m_nLineLength;//the length of line 
  32. COLORREF m_colTextSelected;
  33. COLORREF m_colText;
  34. COLORREF m_colMenu;
  35. int m_nHeight;
  36. bool m_bGrayed;
  37.     CList<MENUITEM *,MENUITEM *> m_ListMenu;//member for save and delete
  38. };
  39. #endif // !defined(AFX_LINEMENU_H__01F4A873_6CF2_4631_B49E_028A19756A05__INCLUDED_)