ProgressBar.h
上传用户:szcysw
上传日期:2013-03-11
资源大小:6752k
文件大小:1k
- #ifndef _INCLUDE_PROGRESSBAR_H_
- #define _INCLUDE_PROGRESSBAR_H_
- class CProgressBar: public CProgressCtrl
- //在状态栏显示的进度条
- {
- public:
- CProgressBar();
- CProgressBar(LPCTSTR strMessage,
- int nSize=100, int MaxValue=100, BOOL bSmooth=FALSE);
- ~CProgressBar();
- BOOL Create(LPCTSTR strMessage,
- int nSize=100, int MaxValue=100, BOOL bSmooth=FALSE);
- DECLARE_DYNCREATE(CProgressBar)
- public:
- BOOL SetRange(int nLower, int nUpper, int nStep = 1);
- BOOL SetText(LPCTSTR strMessage);
- BOOL SetSize(int nSize);
- COLORREF SetBarColour(COLORREF clrBar);
- COLORREF SetBkColour(COLORREF clrBk);
- int SetPos(int nPos);
- int OffsetPos(int nPos);
- int SetStep(int nStep);
- int StepIt();
- void Clear();
- protected:
- int m_nSize;
- // 在进度条左侧显示的文本
- CString m_strMessage;
- CRect m_Rect;
- CStatusBar *GetStatusBar();
- BOOL Resize();
- // Generated message map functions
- protected:
- //{{AFX_MSG(CProgressBar)
- afx_msg BOOL OnEraseBkgnd(CDC* pDC);
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
- };
- #endif