GfxPopupMenu.h
上传用户:guangzhiyw
上传日期:2007-01-09
资源大小:495k
文件大小:2k
源码类别:

ICQ/即时通讯

开发平台:

Visual C++

  1. // GfxPopupMenu.h: interface for the CGfxPopupMenu class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_GFXPOPUPMENU_H__F2CEE8B2_014D_11D2_83E4_0000B43382FE__INCLUDED_)
  5. #define AFX_GFXPOPUPMENU_H__F2CEE8B2_014D_11D2_83E4_0000B43382FE__INCLUDED_
  6. #if _MSC_VER >= 1000
  7. #pragma once
  8. #endif // _MSC_VER >= 1000
  9. class CGfxPopupMenu : public CMenu  
  10. {
  11. public:
  12. struct ToolBarData
  13. { // struct for toolbar resource; guess you already know it ;)
  14. WORD wVersion;
  15. WORD wWidth;
  16. WORD wHeight;
  17. WORD wItemCount;
  18. };
  19. struct SpawnItem
  20. {
  21. int iImageIdx;
  22. int iCmd;
  23. char cText[128];
  24. };
  25. struct ImageItem
  26. {
  27. int iImageIdx;
  28. int iCmd;
  29. };
  30. CGfxPopupMenu();
  31. virtual ~CGfxPopupMenu();
  32. HFONT hMenuBoldFont;
  33. bool CreateBoldFont();
  34. HFONT hMenuFont, hGuiFont;
  35. CSize szImage;
  36. int FindImageItem(const int cmd);
  37. SpawnItem * AddSpawnItem(const char * txt, const int cmd);
  38. void AddImageItem(const int idx, WORD cmd);
  39. void RemapMenu(CMenu * pMenu);
  40. CImageList ilList;
  41. CImageList ilOther;
  42. COLORREF crMenuText, crMenuTextSel;
  43. COLORREF cr3dFace, crMenu, crHighlight, cr3dHilight, cr3dShadow, crGrayText;
  44. COLORREF m_clrBtnFace, m_clrBtnHilight, m_clrBtnShadow;
  45. int iSpawnItem;
  46. SpawnItem ** pSpawnItem;
  47. int iImageItem;
  48. ImageItem * pImageItem;
  49. bool LoadToolBarResource(unsigned int resId);
  50. bool AddToolBarResource(unsigned int resId);
  51. void EnableMenuItems(CMenu * pMenu, CWnd * pParent);
  52. virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
  53. virtual void MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct);
  54. };
  55. #endif // !defined(AFX_GFXPOPUPMENU_H__F2CEE8B2_014D_11D2_83E4_0000B43382FE__INCLUDED_)