Main Page | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

listctrlex.h

00001 //  listctrlex.h
00002 //
00003 //  HARLEM 
00004 //
00005 //  Definition of a modified CListCtrl class allowing  
00006 //  editing of subitems 
00007 //
00008 //  Igor Kurnikov , University of Pittsburgh 
00009 //
00010 //  Creation:  March 14 2000
00011 //
00012 // Based on the code of Zafir Anjum 
00013 //
00014 
00015 #if !defined(LISTCTRLEX_H)
00016 #define LISTCTRLEX_H
00017 
00019 // CInPlaceEdit window
00020 
00021 class CInPlaceEdit : public CEdit
00022 {
00023 // Construction
00024 public:
00025         CInPlaceEdit(int iItem, int iSubItem, CString sInitText);
00026 
00027 // Attributes
00028 public:
00029 
00030 // Operations
00031 public:
00032 
00033 // Overrides
00034         // ClassWizard generated virtual function overrides
00035         //{{AFX_VIRTUAL(CInPlaceEdit)
00036         public:
00037         virtual BOOL PreTranslateMessage(MSG* pMsg);
00038         //}}AFX_VIRTUAL
00039 
00040 // Implementation
00041 public:
00042         virtual ~CInPlaceEdit();
00043 
00044         // Generated message map functions
00045 protected:
00046         //{{AFX_MSG(CInPlaceEdit)
00047         afx_msg void OnKillFocus(CWnd* pNewWnd);
00048         afx_msg void OnNcDestroy();
00049         afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
00050         afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00051         //}}AFX_MSG
00052 
00053         DECLARE_MESSAGE_MAP()
00054 private:
00055         int m_iItem;
00056         int m_iSubItem;
00057         CString m_sInitText;
00058         BOOL    m_bESC;         // To indicate whether ESC key was pressed
00059 };
00060 
00062 
00063 
00064 
00065 class CListCtrlEx1 : public CListCtrl
00066 {
00067 // Construction
00068 public:
00069         CListCtrlEx1();
00070 
00071 // Attributes
00072 public:
00073 
00074 // Operations
00075 public:
00076 
00077 // Overrides
00078         // ClassWizard generated virtual function overrides
00079         //{{AFX_VIRTUAL(CListCtrlEx1)
00080         public:
00081         //}}AFX_VIRTUAL
00082 
00083 //#if (_MFC_VER > 0x500)
00084 //      int GetItemCount() { return GetHeaderCtrl()->GetItemCount(); }
00085 //#endif
00086 
00087 // Implementation
00088 public:
00089         virtual ~CListCtrlEx1();
00090 
00091         // Generated message map functions
00092 protected:
00093         //{{AFX_MSG(CListCtrlEx1)
00094         //}}AFX_MSG
00095 
00096     afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
00097         afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
00098         afx_msg BOOL OnEndLabelEdit(LPNMHDR pnmhdr, LRESULT *pResult);
00099         afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
00100 
00101         int HitTestEx(CPoint &point, int *col);
00102         CEdit* EditSubLabel( int nItem, int nCol );     
00103 
00104         DECLARE_MESSAGE_MAP()
00105 
00106 
00107 };
00108 
00109 
00110 
00111 #endif /* !LISTCTRLEX_H */

Generated on Tue Feb 17 02:03:07 2004 for harlem by doxygen 1.3.6