📄 multilistbox.h
字号:
// MultiListBox.h : header file
//
#ifndef _MULTI_LISTBOX_H_
#define _MULTI_LISTBOX_H_
/////////////////////////////////////////////////////////////////////////////
// CMultiListBox window
class CMultiListBox : public CListBox
{
// Construction
public:
CMultiListBox();
virtual ~CMultiListBox();
// Attributes
public:
protected:
int m_nAvgCharWidth;
int m_nSpacing;
CUIntArray m_aTabs;
CUIntArray m_aColWidth;
UINT m_nTabs;
static CString m_strCharSet;
// Operations
public:
void SetColumnSpace(int nSpacing);
CString GetColText(int nIndex,int nCol);
void SetColText(int nIndex,int nCol,CString sText);
protected:
void CalculateAvgCharWidth(CDC *pDC);
void CalculateTabs();
BOOL CalculateColWidths(LPCSTR pString,BOOL bSetWidths=TRUE);
void InitColWidth();
void Recalc();
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMultiListBox)
//}}AFX_VIRTUAL
afx_msg LRESULT OnAddString(WPARAM wParam,LPARAM lParam);
afx_msg LRESULT OnInsertString(WPARAM wParam,LPARAM lParam);
afx_msg LRESULT OnDeleteString(WPARAM wParam,LPARAM lParam);
afx_msg LRESULT OnResetContent(WPARAM wParam,LPARAM lParam);
// Implementation
// Generated message map functions
protected:
//{{AFX_MSG(CMultiListBox)
// NOTE - the ClassWizard will add and remove member functions here.
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -