ProgressST.h
上传用户:pyhyhg
上传日期:2007-01-01
资源大小:191k
文件大小:1k
源码类别:

界面编程

开发平台:

Visual C++

  1. #ifndef _PROGRESSST_H
  2. #define _PROGRESSST_H
  3. #if _MSC_VER >= 1000
  4. #pragma once
  5. #endif // _MSC_VER >= 1000
  6. // ProgressST.h : header file
  7. //
  8. /////////////////////////////////////////////////////////////////////////////
  9. // CProgressST window
  10. class CProgressST : public CProgressCtrl
  11. {
  12. public:
  13. CProgressST();
  14. virtual ~CProgressST();
  15. // Operations
  16. public:
  17. // Overrides
  18. // ClassWizard generated virtual function overrides
  19. //{{AFX_VIRTUAL(CProgressST)
  20. //}}AFX_VIRTUAL
  21. // Implementation
  22. public:
  23. BOOL SetBitmap(UINT nBitmapId = NULL, BOOL bRepaint = TRUE);
  24. void SetRange(int nLower, int nUpper);
  25. int SetPos(int nPos);
  26. int SetStep(int nStep);
  27. int StepIt( );
  28. static const char* GetVersionC();
  29. static const int GetVersionI();
  30. // Generated message map functions
  31. protected:
  32. //{{AFX_MSG(CProgressST)
  33. afx_msg void OnPaint();
  34. //}}AFX_MSG
  35. DECLARE_MESSAGE_MAP()
  36. private:
  37. BOOL GetBitmapAndPalette(UINT nIDResource, CBitmap& bitmap, CPalette& pal);
  38. void CalcRange();
  39. void DrawProgress(CDC* pDC);
  40. void TileBitmap(CDC* pDestDC, CDC* pSrcDC, CRect rect);
  41. int m_nLower;
  42. int m_nUpper;
  43. int m_nRange;
  44. int m_nStep;
  45. int m_nPos;
  46. CBitmap m_bmPattern;
  47. CPalette m_Palette;
  48. int m_nWidth;
  49. int m_nHeight;
  50. };
  51. /////////////////////////////////////////////////////////////////////////////
  52. //{{AFX_INSERT_LOCATION}}
  53. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  54. #endif