#if !defined(AFX_EDITLISTCTRL_H__B26FE6EC_7377_4DA6_BEC1_E3C656DACFB8__INCLUDED_) #define AFX_EDITLISTCTRL_H__B26FE6EC_7377_4DA6_BEC1_E3C656DACFB8__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 // EditListCtrl.h : header file // #define WM_USER_EDIT_END WM_USER+1002 #include "ComboListCtrl.h" #include "MyEdit.h" class CListCtrlEdit : public CMyEdit { DECLARE_DYNAMIC(CListCtrlEdit) public: CListCtrlEdit(); virtual ~CListCtrlEdit(); // Attributes public: void SetCtrlData(DWORD dwData); DWORD GetCtrlData(); void SetInput(const DWORD dwRight); void SetOthers(const char* pOthers, const int nSize); public: virtual BOOL PreTranslateMessage(MSG* pMsg); protected: afx_msg void OnKillFocus(CWnd* pNewWnd); afx_msg void OnSetFocus(CWnd* pOldWnd); //afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags); DECLARE_MESSAGE_MAP() private: DWORD m_dwData; BOOL m_bExchange; /* DWORD m_dwRight; //可输入权限 char* m_pOthers; //其它允许输入 */ }; ///////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// class CEditListCtrl : public CListCtrl { CSortHeaderCtrl2 m_ctlHeader; // Construction public: CEditListCtrl(); // Attributes public: BOOL SetItemText(int nItem, int nSubItem, LPCTSTR lpszText); CString GetItemText(int nItem, int nSubItem); // Operations public: // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CEditListCtrl) public: virtual BOOL PreTranslateMessage(MSG* pMsg); protected: virtual void PreSubclassWindow(); //}}AFX_VIRTUAL // Implementation public: int m_mode; void InitStyle(); virtual ~CEditListCtrl(); // Generated message map functions protected: //{{AFX_MSG(CEditListCtrl) afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point); afx_msg void OnParentNotify(UINT message, LPARAM lParam); afx_msg void OnCustomdrawList(NMHDR*, LRESULT*); //}}AFX_MSG #ifdef VC60 afx_msg void OnDateEditEnd(WPARAM ,LPARAM lParam = FALSE); afx_msg void OnEditEnd(WPARAM ,LPARAM lParam = FALSE); afx_msg void OnComboBoxEnd(WPARAM ,LPARAM lParam = FALSE); #else afx_msg LRESULT OnDateEditEnd(WPARAM ,LPARAM lParam = FALSE); afx_msg LRESULT OnEditEnd(WPARAM ,LPARAM lParam = FALSE); afx_msg LRESULT OnComboBoxEnd(WPARAM ,LPARAM lParam = FALSE); #endif DECLARE_MESSAGE_MAP() private: void ShowEdit(BOOL bShow,int nItem,int nIndex,CRect rc = CRect(0,0,0,0)); void ShowDateEdit(BOOL bShow,int nItem,int nIndex,CRect rc = CRect(0,0,0,0)); void ShowComboBox(BOOL bShow,int nItem,int nIndex,CRect rc = CRect(0,0,0,0)); CListCtrlEdit m_edit; CListCtrlComboBox m_ComboBox; CDateEdit m_dateedit; int m_nItem; int m_nSub; BOOL Key_Shift(int& nItem,int& nSub); BOOL Key_Ctrl(int& nItem,int &nSub); }; ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_EDITLISTCTRL_H__B26FE6EC_7377_4DA6_BEC1_E3C656DACFB8__INCLUDED_)