LAPTOP-SNT8I5JK\Boounion
2025-03-11 24e3d5124ed62ebd613ba883a366ea3461c9dd17
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
#if !defined(AFX_BLLISTCTRLEXT_H__516D59C3_2F02_47C6_8F4A_D6A78DCDD44A__INCLUDED_)
#define AFX_BLLISTCTRLEXT_H__516D59C3_2F02_47C6_8F4A_D6A78DCDD44A__INCLUDED_
 
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// BLListCtrlExt.h : header file
//
 
#include <afxtempl.h>
 
#include "InPlaceEdit.h"
#include "InPlaceComboBox.h"
 
#define EDITDISABLE_NONE    0
#define EDITDISABLE_ROWS    1
#define EDITDISABLE_COLS    2
#define EDITDISABLE_ROWCOL    3
 
#define INPLACECTRL_EDIT    4
#define INPLACECTRL_COMBO    5
#define INPLACECTRL_EDIT_COMBO    6
 
#define EDITDISABLE_ROWS_ARRAY    7
#define EDITDISABLE_COLS_ARRAY    8
 
#define COMBODATASTATE_SINGLE 9
#define COMBODATASTATE_MULTI  10
 
/////////////////////////////////////////////////////////////////////////////
// CBLListCtrlExt window
 
typedef struct _LISTROWCOLOR
{
    int            s_nRow;
    COLORREF    s_Color;
} ListRowColor, *pListRowColor;
 
class AFX_EXT_CLASS CBLListCtrlExt : public CListCtrl
{
// Construction
public:
    CBLListCtrlExt();
    virtual ~CBLListCtrlExt();
 
// Attributes
public:
 
// Operations
public:
    void SetComboCtrlCols(CString strCols,int nLength);
    void SetEditCtrlCols(CString strCols,int nLength);
    void SetComboData(TCHAR *pData[],int nState,int nLength);
    void SetComboData(CStringList *pList, int nState);
    void EditDisableRows(CString strRows,int nLength);
    void EditDisableCols(CString strCols,int nLength);
    BOOL GetEnableSortList();
    void SetEnableSortList(BOOL nEnable);
    void SortListCtrl(int nCol);
    void InitListHeader(TCHAR *colList[],int *widthList,int nLength, int nHeight);
    void SetInPlaceCtrl(int nCtrl);
    void SetDefaultEditText(CString strInitText);
    void SetEditDisableState(int nState);
    int GetEditDisableCols();
    int GetEditDisableRows();
    int GetEditDisableState();
    void EditDisableRowCol(int nRow,int nCol);
    void EditDisableCols(int nCols);
    void EditDisableRows(int nRows);
    void SetColNum(int nColNum);
    void AddBlankItem();
    CImageList* SetImageList(CImageList* pImageList, int nImageListType);
        
    void InsertListItemEx(int nRow, int nCol, const CString& strString);
    void InsertListItemEx(int nRow, int nCol, int nValue);
    void InsertListItemEx(int nRow, int nCol, double dValue, int nRight = 3);
 
    void SetTextColor(int nRow, COLORREF clrText);
    void SetBKColor(int nRow, COLORREF clrBK);
    void ReleaseTextColor(int nRow);
    void ReleaseBKColor(int nRow);
    void ResetTextColor();
    void ResetBKColor();
 
// Overrides
    // ClassWizard generated virtual function overrides
    //{{AFX_VIRTUAL(CBLListCtrlExt)
    //}}AFX_VIRTUAL
 
protected:
    CInPlaceEdit *m_pEdit;
    CInPlaceComboBox *m_pComboBox;
    int m_nInPlaceCtrl;
    int m_nColNum;
    int m_nEditDisableState;
    int m_nDisableCol;
    int m_nDisableRow;
    BOOL m_bSortOrder;
    CString m_strInitEditText;
    BOOL m_bEnableSortList;
    int *m_pEditDisableCols;
    int *m_pEditDisableRows;
    // Generated message map functions
protected:
    int m_nComboCtrlLength;
    int m_nEditCtrlLength;
    int *m_pComboCtrlCols;
    int *m_pEditCtrlCols;
    CStringList *m_pComboData;
    int m_nLength;
    int m_nComboDataState;
    BOOL m_bSetImageList;
 
// Implementation
public:
    CList<pListRowColor, pListRowColor>    m_ListColorText;
    CList<pListRowColor, pListRowColor>    m_ListColorBk;
 
    // Generated message map functions
protected:
    //{{AFX_MSG(CBLListCtrlExt)
    afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
    afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
    afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
    afx_msg void OnColumnclick(NMHDR* pNMHDR, LRESULT* pResult);
    afx_msg void OnCustomDraw(NMHDR* pNMHDR, LRESULT* pResult);
    //}}AFX_MSG
 
    DECLARE_MESSAGE_MAP()
};
 
/////////////////////////////////////////////////////////////////////////////
 
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
 
#endif // !defined(AFX_BLLISTCTRLEXT_H__516D59C3_2F02_47C6_8F4A_D6A78DCDD44A__INCLUDED_)