ColReadOnlyEdit.h
上传用户:lcxiong207
上传日期:2010-02-24
资源大小:31k
文件大小:2k
源码类别:

按钮控件

开发平台:

Visual C++

  1. #if !defined(AFX_COLREADONLYEDIT_H__298E816B_C7D3_418F_9379_9AD8B8041EB5__INCLUDED_)
  2. #define AFX_COLREADONLYEDIT_H__298E816B_C7D3_418F_9379_9AD8B8041EB5__INCLUDED_
  3. #if _MSC_VER > 1000
  4. #pragma once
  5. #endif // _MSC_VER > 1000
  6. // ColReadOnlyEdit.h : header file
  7. //
  8. /////////////////////////////////////////////////////////////////////////////
  9. // CColReadOnlyEdit window
  10. class CColReadOnlyEdit : public CEdit
  11. {
  12. // Construction
  13. public:
  14. CColReadOnlyEdit();
  15. CBrush m_Brush;
  16. CString m_Text;
  17. COLORREF m_BackColor;
  18. COLORREF m_TextColor;
  19. BOOL bReadOnly;
  20. // Attributes
  21. public:
  22. // Operations
  23. public:
  24. // Overrides
  25. // ClassWizard generated virtual function overrides
  26. //{{AFX_VIRTUAL(CColReadOnlyEdit)
  27. public:
  28. virtual BOOL PreTranslateMessage(MSG* pMsg);
  29. virtual BOOL OnChildNotify(UINT message, WPARAM wParam, LPARAM lParam, LRESULT* pLResult);
  30. //}}AFX_VIRTUAL
  31. // Implementation
  32. public:
  33. BOOL GetEditReadOnly();
  34. void SetEditReadOnly(BOOL bReadOnly);
  35. COLORREF GetEditBkColor();
  36. COLORREF GetEditTextColor();
  37. void SetEditTextColor(COLORREF textColor);
  38. void SetEditBkColor(COLORREF bkColor);
  39. virtual ~CColReadOnlyEdit();
  40. // Generated message map functions
  41. protected:
  42. //{{AFX_MSG(CColReadOnlyEdit)
  43. afx_msg void OnPaint();
  44. afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
  45. //}}AFX_MSG
  46. DECLARE_MESSAGE_MAP()
  47. };
  48. /////////////////////////////////////////////////////////////////////////////
  49. //{{AFX_INSERT_LOCATION}}
  50. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  51. #endif // !defined(AFX_COLREADONLYEDIT_H__298E816B_C7D3_418F_9379_9AD8B8041EB5__INCLUDED_)