Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

78 lines
2.0 KiB

  1. #if !defined(AFX_ENHPROGRESSCTRL_H__12909D73_C393_11D1_9FAE_8192554015AD__INCLUDED_)
  2. #define AFX_ENHPROGRESSCTRL_H__12909D73_C393_11D1_9FAE_8192554015AD__INCLUDED_
  3. #if _MSC_VER >= 1000
  4. #pragma once
  5. #endif // _MSC_VER >= 1000
  6. // EnhProgressCtrl.h : header file
  7. //
  8. //
  9. // GradientProgressCtrl.h : header file
  10. //
  11. #define HORIZONTAL 0x10
  12. #define VERTICAL 0x20
  13. /////////////////////////////////////////////////////////////////////////////
  14. // CGradientProgressCtrl window
  15. class CGradientProgressCtrl : public CProgressCtrl
  16. {
  17. // Construction
  18. public:
  19. CGradientProgressCtrl();
  20. // Attributes
  21. public:
  22. // Attributes
  23. void SetRange(long nLower, long nUpper);
  24. int StepIt(void);
  25. // Operations
  26. public:
  27. // Set Functions
  28. void SetBkColor(COLORREF color) {m_clrBkGround = color;}
  29. void SetStartColor(COLORREF color) {m_clrStart = color;}
  30. void SetEndColor(COLORREF color) {m_clrEnd = color;}
  31. void SetDirection(BYTE nDirection) {m_nDirection = nDirection;}
  32. void SetPos(long nPos) {m_nCurrentPosition = nPos;}
  33. // Show the percent caption
  34. void ShowPercent(BOOL bShowPercent = TRUE) {m_bShowPercent = bShowPercent;}
  35. // Overrides
  36. // ClassWizard generated virtual function overrides
  37. //{{AFX_VIRTUAL(CGradientProgressCtrl)
  38. //}}AFX_VIRTUAL
  39. // Implementation
  40. public:
  41. virtual ~CGradientProgressCtrl();
  42. // Generated message map functions
  43. protected:
  44. void DrawGradient(const HDC hDC, const RECT &rectClient, const short &nMaxWidth);
  45. BYTE m_nStep;
  46. long m_nLower, m_nUpper, m_nCurrentPosition;
  47. BYTE m_nDirection;
  48. COLORREF m_clrStart, m_clrEnd, m_clrBkGround, m_clrText;
  49. BOOL m_bShowPercent;
  50. //{{AFX_MSG(CGradientProgressCtrl)
  51. afx_msg void OnPaint();
  52. afx_msg BOOL OnEraseBkgnd(CDC* pDC);
  53. //}}AFX_MSG
  54. DECLARE_MESSAGE_MAP()
  55. };
  56. /////////////////////////////////////////////////////////////////////////////
  57. //{{AFX_INSERT_LOCATION}}
  58. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  59. #endif // !defined(AFX_ENHPROGRESSCTRL_H__12909D73_C393_11D1_9FAE_8192554015AD__INCLUDED_)