travelLogHelper.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. #ifndef NULLSOFT_WINAMP_TRAVELLOG_HELPER_HEADER
  2. #define NULLSOFT_WINAMP_TRAVELLOG_HELPER_HEADER
  3. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  4. #pragma once
  5. #endif
  6. #include <wtypes.h>
  7. #include "./browserInternal.h"
  8. #include "./ifc_menucustomizer.h"
  9. #include "./ifc_travelloghelper.h"
  10. #include "./obj_ombrowser.h"
  11. #include <bfc/multipatch.h>
  12. interface IWebBrowser2;
  13. #define MPIID_TRAVELLOGHELPER 10
  14. #define MPIID_MENUCUSTOMIZER 20
  15. class TravelLogHelper : public MultiPatch<MPIID_TRAVELLOGHELPER, ifc_travelloghelper>,
  16. public MultiPatch<MPIID_MENUCUSTOMIZER, ifc_menucustomizer>
  17. {
  18. protected:
  19. TravelLogHelper(IWebBrowser2 *pWeb2);
  20. ~TravelLogHelper();
  21. public:
  22. static HRESULT CreateInstance(IWebBrowser2 *pWeb2, TravelLogHelper **instance);
  23. public:
  24. /* Dispatchable */
  25. size_t AddRef();
  26. size_t Release();
  27. int QueryInterface(GUID interface_guid, void **object);
  28. /* ifc_travelloghelper */
  29. HRESULT QueryStorage(ITravelLogStg **ppLog);
  30. HRESULT ShowPopup(UINT fuFlags, INT x, INT y, HWND hwnd, LPTPMPARAMS lptpm);
  31. /* ifc_menucustomizer */
  32. INT CustomDraw(HMENU menuInstance, INT action, HDC hdc, LPARAM param);
  33. protected:
  34. BOOL DrawIcon(HMENU menuInstance, HDC hdc, DRAWITEMSTRUCT *pdis);
  35. protected:
  36. RECVS_MULTIPATCH;;
  37. protected:
  38. ULONG ref;
  39. IWebBrowser2 *pWeb2;
  40. HBITMAP bitmap;
  41. BITMAPINFOHEADER header;
  42. void *pixelData;
  43. BOOL firstFwd;
  44. ULONG entriesCount;
  45. LONG backEntry;
  46. };
  47. #endif //NULLSOFT_WINAMP_TRAVELLOG_HELPER_HEADER