-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCustomDrawListCtrl.h
More file actions
49 lines (42 loc) · 1.14 KB
/
Copy pathCustomDrawListCtrl.h
File metadata and controls
49 lines (42 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#pragma once
#include "CustomDrawHeaderCtrl.h"
#include <vector>
using namespace std;
// CCustomDrawListCtrl
//±£´æcheckbox״̬
struct ITEM_CHECK
{
int itemID;
BOOL isChecked;
};
class CCustomDrawListCtrl : public CListCtrl
{
DECLARE_DYNAMIC(CCustomDrawListCtrl)
public:
CCustomDrawListCtrl();
virtual ~CCustomDrawListCtrl();
void SetRowHeight(int rowHeight);
protected:
DECLARE_MESSAGE_MAP()
virtual void PreSubclassWindow();
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
protected:
virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
void MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct);
public:
int InsertColumn(int nCol, LPCTSTR lpszColumnHeading,
int nFormat = LVCFMT_LEFT, int nWidth = -1, int nSubItem = -1);
int InsertItem(int nItem,LPCTSTR lpszItem);
void DeleteAllItems();
vector<ITEM_CHECK>& GetItemChecked();
protected:
CCustomDrawHeaderCtrl m_headerCtrl;
int m_nRowHeight;
COLORREF m_txtColor;
COLORREF m_txtHighLightColor;
COLORREF m_selectedBorderColor;
COLORREF m_highLightColColor;
COLORREF m_highLightColColor2;
vector<ITEM_CHECK> m_itemVector;
vector<ITEM_CHECK> m_itemCheckVector;
};