TextProgressCtrl.h
上传用户:nhyuejuan
上传日期:2013-12-02
资源大小:171k
文件大小:2k
源码类别:

状态条

开发平台:

Visual C++

  1. //以下是H文件
  2. #if !defined(AFX_TEXTPROGRESSCTRL_H__4C78DBBE_EFB6_11D1_AB14_203E25000000__INCLUDED_)
  3. #define AFX_TEXTPROGRESSCTRL_H__4C78DBBE_EFB6_11D1_AB14_203E25000000__INCLUDED_
  4. #if _MSC_VER >= 1000
  5. #pragma once
  6. #endif // _MSC_VER >= 1000
  7. // TextProgressCtrl.h : header file
  8. //
  9. // Written by Chris Maunder (chrismaunder@codeguru.com)
  10. // Copyright 1998.
  11. /////////////////////////////////////////////////////////////////////////////
  12. // CTextProgressCtrl window
  13. class CTextProgressCtrl : public CProgressCtrl
  14. {
  15. // Construction
  16. public:
  17.     CTextProgressCtrl();
  18. // Attributes
  19. public:
  20. // Operations
  21. public:
  22.     int            SetPos(int nPos);
  23.     int            StepIt();
  24.     void        SetRange(int nLower, int nUpper);
  25.     int            OffsetPos(int nPos);
  26.     int            SetStep(int nStep);
  27.     void        SetForeColour(COLORREF col);
  28.     void        SetBkColour(COLORREF col);
  29.     void        SetTextForeColour(COLORREF col);
  30.     void        SetTextBkColour(COLORREF col);
  31.     COLORREF    GetForeColour();
  32.     COLORREF    GetBkColour();
  33.     COLORREF    GetTextForeColour();
  34.     COLORREF    GetTextBkColour();
  35.     void        SetShowText(BOOL bShow);
  36. // Overrides
  37.     // ClassWizard generated virtual function overrides
  38.     //{{AFX_VIRTUAL(CTextProgressCtrl)
  39.     //}}AFX_VIRTUAL
  40. // Implementation
  41. public:
  42.     virtual ~CTextProgressCtrl();
  43.     // Generated message map functions
  44. protected:
  45.     int         m_nPos, 
  46.                 m_nStepSize, 
  47.                 m_nMax, 
  48.                 m_nMin;
  49.     CString     m_strText;
  50.     BOOL        m_bShowText;
  51.     int         m_nBarWidth;
  52.     COLORREF    m_colFore,
  53.                 m_colBk,
  54.                 m_colTextFore,
  55.                 m_colTextBk;
  56.     //{{AFX_MSG(CTextProgressCtrl)
  57.     afx_msg BOOL OnEraseBkgnd(CDC* pDC);
  58.     afx_msg void OnPaint();
  59.     afx_msg void OnSize(UINT nType, int cx, int cy);
  60.     //}}AFX_MSG
  61.     afx_msg LRESULT OnSetText(UINT, LPCTSTR szText);
  62.     afx_msg LRESULT OnGetText(UINT cchTextMax, LPTSTR szText);
  63.     DECLARE_MESSAGE_MAP()
  64. };
  65. /////////////////////////////////////////////////////////////////////////////
  66. //{{AFX_INSERT_LOCATION}}
  67. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  68. #endif // !defined(AFX_TEXTPROGRESSCTRL_H__4C78DBBE_EFB6_11D1_AB14_203E25000000__INCLUDED_)