InPlaceEdit.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #pragma once
  2. class CInPlaceEdit : public CEdit
  3. {
  4. // Construction
  5. public:
  6. CInPlaceEdit(CWnd* pParent, CRect& rect, DWORD dwStyle, UINT nID,
  7. int nRow, int nColumn, CString sInitText, UINT nFirstChar);
  8. // Attributes
  9. public:
  10. // Operations
  11. public:
  12. void EndEdit();
  13. // Overrides
  14. // ClassWizard generated virtual function overrides
  15. //{{AFX_VIRTUAL(CInPlaceEdit)
  16. public:
  17. virtual BOOL PreTranslateMessage(MSG* pMsg);
  18. protected:
  19. virtual void PostNcDestroy();
  20. //}}AFX_VIRTUAL
  21. // Implementation
  22. public:
  23. virtual ~CInPlaceEdit();
  24. // Generated message map functions
  25. protected:
  26. //{{AFX_MSG(CInPlaceEdit)
  27. afx_msg void OnKillFocus(CWnd* pNewWnd);
  28. afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
  29. afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
  30. afx_msg UINT OnGetDlgCode();
  31. //}}AFX_MSG
  32. DECLARE_MESSAGE_MAP()
  33. private:
  34. int m_nRow;
  35. int m_nColumn;
  36. CString m_sInitText;
  37. UINT m_nLastChar;
  38. BOOL m_bExitOnArrows;
  39. CRect m_Rect;
  40. };