skinnedlistview.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #ifndef NULLOSFT_MEDIALIBRARY_SKINNED_LISTVIEW_CONTROL_HEADER
  2. #define NULLOSFT_MEDIALIBRARY_SKINNED_LISTVIEW_CONTROL_HEADER
  3. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  4. #pragma once
  5. #endif
  6. #include "./skinnedscrollwnd.h"
  7. #include <commctrl.h>
  8. extern int config_use_alternate_colors;
  9. class SkinnedListView : public SkinnedScrollWnd
  10. {
  11. protected:
  12. SkinnedListView(void);
  13. virtual ~SkinnedListView(void);
  14. public:
  15. virtual BOOL SetStyle(UINT newStyle, BOOL bRedraw);
  16. protected:
  17. virtual BOOL Attach(HWND hwndListView);
  18. virtual void TryAttachHeader(void);
  19. virtual LRESULT WindowProc(UINT uMsg, WPARAM wParam, LPARAM lParam);
  20. virtual BOOL OnReflectedNotify(HWND hwndFrom, INT idCtrl, NMHDR *pnmh, LRESULT *pResult);
  21. virtual BOOL OnCustomDraw(HWND hwndFrom, NMLVCUSTOMDRAW *plvcd, LRESULT *pResult);
  22. virtual void OnSkinChanged(BOOL bNotifyChildren, BOOL bRedraw);
  23. virtual LRESULT OnEraseBackground(HDC hdc);
  24. virtual BOOL OnMediaLibraryIPC(INT msg, INT_PTR param, LRESULT *pResult);
  25. virtual void OnLButtonDown(UINT uFlags, POINTS pts);
  26. virtual void OnRButtonDown(UINT uFlags, POINTS pts);
  27. virtual void OnKeyDown(UINT vkCode, UINT flags);
  28. virtual LRESULT OnGetDlgCode(UINT vkCode, MSG* pMsg);
  29. private:
  30. friend BOOL SkinWindowEx(HWND hwndToSkin, INT type, UINT style);
  31. private:
  32. UINT listFlags;
  33. COLORREF currentColor;
  34. DWORD currentItem;
  35. };
  36. #endif // NULLOSFT_MEDIALIBRARY_SKINNED_LISTVIEW_CONTROL_HEADER