/////////////////////////////////////////////////////////////////////////////////////////////// // // CListViewControl // ////////////////////////////////////////////////////////////////////////////////////////////// #ifndef _CListViewControl #define _CListViewControl #include // MFC support for Windows Common Controls #include "InPlaceEdit.h" #include "InPlaceList.h" #define IDC_IPEDIT 4321 const unsigned int CT_NORMAL = 0; const unsigned int CT_EDIT = 1; const unsigned int CT_COMBO = 2; class CListViewControl : public CListCtrl { public: CListViewControl(); virtual ~CListViewControl(); protected: //{{AFX_MSG(CCharList) afx_msg void OnCustomDraw(NMHDR* pNMHDR, LRESULT* pResult); afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point); afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar); afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar); //}}AFX_MSG bool SetColumnType(int ColNum, unsigned int Type = CT_EDIT); bool SetColumnStringList(int ColNum, CStringList &StringList); int HitTestEx(CPoint &point, int *col) const; CEdit* EditSubLabel(int nItem, int nCol); CComboBox* ShowInPlaceList(int nItem, int nCol, CStringList &lstItems, int nSel); private: unsigned int m_ColType[100]; CStringList m_ColumnStringList[100]; DECLARE_MESSAGE_MAP() }; #endif