SDC C-Project CF Review 프로그램
LYW
2021-06-28 cf6a4019e9efbc0503bd3fbcf6f951565d028972
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
#pragma once
 
#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
 
/////////////////////////////////////////////////////////////////////////////
// CListCtrlEx window
 
typedef struct _LISTROWCOLOR
{
    int            s_nRow;
    COLORREF    s_Color;
} ListRowColor, *pListRowColor;
 
class CListCtrlEx : public CListCtrl
{
// Construction
public:
    CListCtrlEx();
    virtual ~CListCtrlEx();
 
// 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 InitNumericCol(BOOL* pbCol,int nLength);
    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 InsertListItem(int nRow, int nCol, LPTSTR lpString);
    void InsertListItem(int nRow, int nCol, int nImageIdx, LPTSTR lpString);
    void InsertListItem(int nRow, int nCol, int nImageIdx);
 
    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(CListCtrlEx)
    //}}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;
    BOOL* m_pbNumericCol;
    
// Implementation
public:
    CList<pListRowColor, pListRowColor>    m_ListColorText;
    CList<pListRowColor, pListRowColor>    m_ListColorBk;
 
    // Generated message map functions
protected:
    //{{AFX_MSG(CListCtrlEx)
    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()
};