ProgressBar.h
上传用户:szklck
上传日期:2007-01-22
资源大小:925k
文件大小:2k
源码类别:

图形图像处理

开发平台:

Visual C++

  1. #if !defined(AFX_PROGRESSBAR_H__08333FA6_BB2A_4D7B_9D83_E5431C049383__INCLUDED_)
  2. #define AFX_PROGRESSBAR_H__08333FA6_BB2A_4D7B_9D83_E5431C049383__INCLUDED_
  3. #if _MSC_VER > 1000
  4. #pragma once
  5. #endif // _MSC_VER > 1000
  6. // ProgressBar.h : header file
  7. //
  8. /////////////////////////////////////////////////////////////////////////////
  9. // CProgressBar window
  10. class CProgressBar : public CProgressCtrl
  11. {
  12. // Construction
  13. public:
  14. CProgressBar();
  15. CProgressBar(LPCTSTR strMessage, int nSize=100, int MaxValue=100, BOOL bSmooth=FALSE);
  16.     BOOL Create(LPCTSTR strMessage, int nSize=100, int MaxValue=100, BOOL bSmooth=FALSE);
  17. // Attributes
  18. public:
  19. // Operations
  20. public:
  21. BOOL Success() {return m_bSuccess;}// Was the creation successful?
  22.     void SetRange(int nLower, int nUpper, int nStep = 1);
  23.     void SetText(LPCTSTR strMessage);
  24.     void SetSize(int nSize);
  25.     int  SetStep(int nStep);
  26.     int  StepIt();
  27.     void Clear();
  28. // Overrides
  29. // ClassWizard generated virtual function overrides
  30. //{{AFX_VIRTUAL(CProgressBar)
  31. public:
  32. //}}AFX_VIRTUAL
  33. // Implementation
  34. public:
  35. virtual ~CProgressBar();
  36. // Generated message map functions
  37. protected:
  38. //{{AFX_MSG(CProgressBar)
  39. afx_msg BOOL OnEraseBkgnd(CDC* pDC);
  40. //}}AFX_MSG
  41. BOOL m_bSuccess; // Successfully created?
  42.     int m_nSize; // Percentage size of control
  43.     CString m_strMessage; // Message to display to left of control
  44. CRect m_Rect; // Dimensions of the whole thing
  45.     CStatusBar *GetStatusBar();
  46.     void Resize();
  47. DECLARE_MESSAGE_MAP()
  48. };
  49. /////////////////////////////////////////////////////////////////////////////
  50. //{{AFX_INSERT_LOCATION}}
  51. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  52. #endif // !defined(AFX_PROGRESSBAR_H__08333FA6_BB2A_4D7B_9D83_E5431C049383__INCLUDED_)