📄 listctrlex.h
字号:
#if !defined(AFX_LISTCTRLEX_H__4F090DBB_E639_4D34_A13E_10DA64D50B78__INCLUDED_)
#define AFX_LISTCTRLEX_H__4F090DBB_E639_4D34_A13E_10DA64D50B78__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// ListCtrlEx.h : header file
//
//=============================================================================
// 设计: 张俊勇, 2006.06.18
// Email:imzhjy@163.com, zhjysoft@163.com QQ:44049283
// 自由地使用,修改,或传播此代码,但您要是用在某某项目中或用于商业用途,那请您注意
// 我不会对因代码bug问题,或版权问题对您造成的损失负任何责任。
// 欢迎提修改意见,
/////////////////////////////////////////////////////////////////////////////
// CListCtrlEx window
const int IDC_INPLACE_EDIT = 0x5000;
const int IDC_INPLACE_COMBO = 0x5001;
#define UM_CHECKSTATECHANGE (WM_USER + 200)
#define UM_SELECTCHANGE (WM_USER + 201)
#define UM_EDITCHANGED (WM_USER + 202)
#define USED_CTRL_EDIT 0x0001
#define USED_CTRL_COMBO 0x0002
class CListCtrlEx : public CListCtrl
{
// Construction
public:
CListCtrlEx();
// Attributes
public:
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CListCtrlEx)
protected:
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CListCtrlEx();
// Generated message map functions
protected:
//{{AFX_MSG(CListCtrlEx)
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnKillFocus(CWnd* pNewWnd);
afx_msg void OnNcLButtonDblClk(UINT nHitTest, CPoint point);
afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
//}}AFX_MSG
afx_msg void OnKillfocusEditBox();
afx_msg void OnChangeEditBox();
afx_msg void OnKillfocusCmbBox();
afx_msg void OnSelchangeCmbBox();
DECLARE_MESSAGE_MAP()
public:
void SetUsedCtrl(int nUsedCtrl);
int m_nRow,m_nCol;
BOOL m_bShowCtrl;
CWnd * m_pLastCtrl;
CEdit * m_pEdit;
CComboBox *m_pCombo;
CString m_strComboOld;
void ShowCtrl(int nRow, int nCol, CWnd* pCtrl);
private:
CFont font;
int m_nUsedCtrl;
BOOL m_bEditing;
int HitTestEx(CPoint point);
void SelectCell(CPoint point);
void ShowCtrl();
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_LISTCTRLEX_H__4F090DBB_E639_4D34_A13E_10DA64D50B78__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -