www.pudn.com > Shutdown.rar > Y_Cls_ListCtrl_.h


#if !defined(AFX_Y_CLS_LISTCTRL__H__E59829DD_6817_4AF1_A291_F52FA499A8FC__INCLUDED_) 
#define AFX_Y_CLS_LISTCTRL__H__E59829DD_6817_4AF1_A291_F52FA499A8FC__INCLUDED_ 
 
#if _MSC_VER > 1000 
#pragma once 
#endif // _MSC_VER > 1000 
// Y_Cls_ListCtrl_.h : header file 
// 
 
///////////////////////////////////////////////////////////////////////////// 
// Y_Cls_ListCtrl_ window 
#include "Y_Cls_Combox_.h" 
#include "Y_Cls_Edit_.h" 
#include "Y_Cls_Button_.h" 
#include "Y_Cls_Mouth_.h" 
 
#define IDC_NEWEDIT 201 
#define IDC_NEYMYCOMBO 202 
#define IDC_NEWMYBUTTON 203 
#define IDC_NEWTIMECTRL 204 
 
#define MSG_EDITFINISH WM_USER+125 
#define MSG_COMSELCHANGE WM_USER+126 
//#define MSG_SELECTDATE WM_USER+127 //在子类中有定义 
//#define MSG_KILLMOUTH WM_USER+128	//在子类中有定义	 
#define MSG_CLICK_BUTTON WM_USER+129 
class Y_Cls_ListCtrl_ : public CListCtrl 
{ 
public: 
	void SetCurSel(int curItem); 
// Construction 
public: 
	Y_Cls_ListCtrl_(); 
	Y_Cls_Edit_ *m_pEdit; 
	Y_Cls_Combox_ *m_pComboBox; 
	Y_Cls_Button_ *m_pMyButton; 
	Y_Cls_Mouth_ * m_pMouth; 
	UINT m_ID;//ListCtrl的ID 
 
	int Old_iItem; 
	int Old_iSubItem; 
protected: 
	CRect Old_Rect; 
	CRect m_Rect; 
// Attributes 
public: 
 
// Operations 
public: 
 
// Overrides 
	// ClassWizard generated virtual function overrides 
	//{{AFX_VIRTUAL(Y_Cls_ListCtrl_) 
	//}}AFX_VIRTUAL 
 
// Implementation 
public: 
	void CreateMouthCtrl(); 
	BOOL DeleteItem( int nItem ); 
 
	void GetComboText(); 
	virtual ~Y_Cls_ListCtrl_(); 
 
	// Generated message map functions 
protected: 
	void DelBtn(); 
	void Create_ComboBox(CRect rect,CString *strData,int nCount,int EnableEdit); 
	//创建一个普能的EDit 	 
	//Style 0为创建纯数字,1为可输入小数点的EDit,2为没有任何限制 
	//nLimit EDit输入的字符数 
	//str	创建时EDit初始内容 
	void CreateEdit(int nStyle,CString str,int nLimit = 16); 
	void OnClickMyButton(); 
	void cyp_EditKillFocus(); 
	//{{AFX_MSG(Y_Cls_ListCtrl_) 
	afx_msg void OnClick(NMHDR* pNMHDR, LRESULT* pResult); 
	afx_msg void OnEndlabeledit(NMHDR* pNMHDR, LRESULT* pResult); 
	afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar); 
	afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar); 
	afx_msg void OnDestroy(); 
	//}}AFX_MSG 
	afx_msg LRESULT DeleteMouth(WPARAM wp,LPARAM lp); 
	afx_msg LRESULT SelectDate(WPARAM wp,LPARAM lp); 
	DECLARE_MESSAGE_MAP() 
}; 
 
///////////////////////////////////////////////////////////////////////////// 
 
//{{AFX_INSERT_LOCATION}} 
// Microsoft Visual C++ will insert additional declarations immediately before the previous line. 
 
#endif // !defined(AFX_Y_CLS_LISTCTRL__H__E59829DD_6817_4AF1_A291_F52FA499A8FC__INCLUDED_)