ListBoxEx.h 611 B

1234567891011121314151617181920212223242526272829303132
  1. #pragma once
  2. // CListBoxEx
  3. #define WM_ACTIVE_ITEM WM_USER+0x01
  4. class CListBoxEx : public CListBox
  5. {
  6. DECLARE_DYNAMIC(CListBoxEx)
  7. protected:
  8. INT m_nItemHeight; //节点高度
  9. public:
  10. CListBoxEx();
  11. virtual ~CListBoxEx();
  12. protected:
  13. DECLARE_MESSAGE_MAP()
  14. public:
  15. //设置节点高度
  16. void SetItemHeight(int nItemHeight);
  17. //传统继承
  18. virtual void MeasureItem(LPMEASUREITEMSTRUCT /*lpMeasureItemStruct*/);
  19. virtual void DrawItem(LPDRAWITEMSTRUCT /*lpDrawItemStruct*/);
  20. virtual int CompareItem(LPCOMPAREITEMSTRUCT /*lpCompareItemStruct*/);
  21. afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  22. };