1
0

ifc_menucustomizer.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. #ifndef NULLSOFT_WINAMP_MENU_CUSTOMIZER_INTERFACE_HEADER
  2. #define NULLSOFT_WINAMP_MENU_CUSTOMIZER_INTERFACE_HEADER
  3. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  4. #pragma once
  5. #endif
  6. // {780C1929-76FD-4a06-934B-C85CC285A4DE}
  7. static const GUID IFC_MenuCustomizer =
  8. { 0x780c1929, 0x76fd, 0x4a06, { 0x93, 0x4b, 0xc8, 0x5c, 0xc2, 0x85, 0xa4, 0xde } };
  9. #include "main.h"
  10. #include <bfc/dispatch.h>
  11. typedef LPVOID HMLIMGLST;
  12. class __declspec(novtable) ifc_menucustomizer : public Dispatchable
  13. {
  14. protected:
  15. ifc_menucustomizer() {}
  16. ~ifc_menucustomizer() {}
  17. public:
  18. HMLIMGLST GetImageList(void);
  19. UINT GetSkinStyle(void);
  20. HRESULT GetWidth(INT *widthOut);
  21. INT CustomDraw(HMENU menuInstance, INT action, HDC hdc, LPARAM param);
  22. public:
  23. DISPATCH_CODES
  24. {
  25. API_GETIMAGELIST = 10,
  26. API_GETSKINSTYLE = 20,
  27. API_GETWIDTH = 30,
  28. API_CUSTOMDRAW = 40,
  29. };
  30. };
  31. inline HMLIMGLST ifc_menucustomizer::GetImageList(void)
  32. {
  33. return _call(API_GETIMAGELIST, (HMLIMGLST)NULL);
  34. }
  35. inline UINT ifc_menucustomizer::GetSkinStyle(void)
  36. {
  37. return (UINT)_call(API_GETSKINSTYLE, (UINT)/*SMS_USESKINFONT*/0x00000001);
  38. }
  39. inline HRESULT ifc_menucustomizer::GetWidth(INT *widthOut)
  40. {
  41. return _call(API_GETWIDTH, (HRESULT)E_NOTIMPL, widthOut);
  42. }
  43. inline INT ifc_menucustomizer::CustomDraw(HMENU menuInstance, INT action, HDC hdc, LPARAM param)
  44. {
  45. return _call(API_CUSTOMDRAW, (INT)FALSE, menuInstance, action, hdc, param);
  46. }
  47. #endif // NULLSOFT_WINAMP_MENU_CUSTOMIZER_INTERFACE_HEADER