1
0

ratingMenuCustomizer.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #ifndef NULLSOFT_WINAMP_RATING_MENU_CUSTOMIZER_HEADER
  2. #define NULLSOFT_WINAMP_RATING_MENU_CUSTOMIZER_HEADER
  3. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  4. #pragma once
  5. #endif
  6. #include <wtypes.h>
  7. #include "./ifc_menucustomizer.h"
  8. class ifc_skinnedrating;
  9. class RatingMenuCustomizer : public ifc_menucustomizer
  10. {
  11. protected:
  12. RatingMenuCustomizer(HMENU hMenu, ifc_skinnedrating *skinnedRating);
  13. ~RatingMenuCustomizer();
  14. public:
  15. static HRESULT CreateInstance(HMENU hMenu, ifc_skinnedrating *skinnedRating, RatingMenuCustomizer **instance);
  16. public:
  17. /* Dispatchable */
  18. size_t AddRef();
  19. size_t Release();
  20. int QueryInterface(GUID interface_guid, void **object);
  21. /* ifc_menucustomizer (partial) */
  22. INT CustomDraw(HMENU menuInstance, INT action, HDC hdc, LPARAM param);
  23. protected:
  24. HRESULT GetValue(INT itemId, INT *valueOut);
  25. INT MeasureRating(HDC hdc, MEASUREITEMSTRUCT *pmis);
  26. INT DrawRating(HDC hdc, DRAWITEMSTRUCT *pdis);
  27. protected:
  28. RECVS_DISPATCH;
  29. protected:
  30. ULONG ref;
  31. HMENU menu;
  32. ifc_skinnedrating *skin;
  33. };
  34. #endif //NULLSOFT_WINAMP_RATING_MENU_CUSTOMIZER_HEADER