newlistctrl.h

来自「vc 和mapobjects地理信息系统组件开发 很有启发意义和参考价值」· C头文件 代码 · 共 104 行

H
104
字号
#if !defined(AFX_NEWLISTCTRL_H__74D65B38_5927_45EB_BA9A_52C17672BF06__INCLUDED_)
#define AFX_NEWLISTCTRL_H__74D65B38_5927_45EB_BA9A_52C17672BF06__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// NewListCtrl.h : header file
//

/////////////////////////////////////////////////////////////////////////////
// CMyEdit window

class CMyEdit : public CEdit
{
// Construction
public:
	CMyEdit();

// Attributes
public:

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CMyEdit)
	public:
	virtual BOOL PreTranslateMessage(MSG* pMsg);
	//}}AFX_VIRTUAL

// Implementation
public:
	CFont m_font;
	virtual ~CMyEdit();

	// Generated message map functions
protected:
	//{{AFX_MSG(CMyEdit)
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnKillFocus(CWnd* pNewWnd);
	//}}AFX_MSG

	DECLARE_MESSAGE_MAP()
private:
	BOOL m_bInputValid;
};

/////////////////////////////////////////////////////////////////////////////
// CNewListCtrl window

class CNewListCtrl : public CListCtrl
{
public:
	CUIntArray m_uaEdited;	//被编辑的行
//	int	m_nCol;				//被禁止编辑的列

protected:
	BOOL m_bEditing;	//是否有表项正在被编辑状态
	CMyEdit m_edit;		//编辑控件
	int m_nItem;			//被编辑表项的行号
	int m_nSubItem;		//被编辑表项的列号

	BOOL MyBeginEdit();

// Construction
public:
	CNewListCtrl();
	void MyEndEdit( BOOL bValidate );

// Attributes
public:

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CNewListCtrl)
	protected:
	virtual void PreSubclassWindow();
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CNewListCtrl();

	// Generated message map functions
protected:
	//{{AFX_MSG(CNewListCtrl)
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	//}}AFX_MSG

	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_NEWLISTCTRL_H__74D65B38_5927_45EB_BA9A_52C17672BF06__INCLUDED_)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?