Leaked source code of windows server 2003
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.

77 lines
1.5 KiB

  1. //
  2. // progband.h Progress band code
  3. //
  4. // Copyright Microsoft Corportation 2001
  5. // (nadima)
  6. //
  7. #ifndef _progband_h_
  8. #define _progband_h_
  9. //
  10. // Timer ID
  11. //
  12. #define TIMER_PROGRESSBAND_ANIM_ID 137
  13. //
  14. // x increment per anim iteration
  15. //
  16. #define PROGRESSBAND_ANIM_INCR 5
  17. //
  18. // Animation delay
  19. //
  20. #define ANIM_DELAY_MSECS 20
  21. class CProgressBand
  22. {
  23. public:
  24. CProgressBand(HWND hwndOwner,
  25. HINSTANCE hInst,
  26. INT nYindex,
  27. INT nResID,
  28. INT nResID8bpp,
  29. HPALETTE hPal);
  30. ~CProgressBand();
  31. BOOL Initialize();
  32. BOOL StartSpinning();
  33. BOOL StopSpinning();
  34. BOOL ReLoadBmps();
  35. VOID ResetBandOffset() {_nBandOffset = 0;}
  36. INT GetBandHeight() {return _rcBand.bottom - _rcBand.top;}
  37. //
  38. // Events that must be called by parent
  39. //
  40. BOOL OnEraseParentBackground(HDC hdc);
  41. BOOL OnTimer(INT nTimerID);
  42. private:
  43. //
  44. // Private member functions
  45. //
  46. BOOL InitBitmaps();
  47. BOOL PaintBand(HDC hdc);
  48. private:
  49. //
  50. // Private members
  51. //
  52. BOOL _fInitialized;
  53. HWND _hwndOwner;
  54. HINSTANCE _hInstance;
  55. INT _nYIndex;
  56. INT _nResID;
  57. INT _nResID8bpp;
  58. HBITMAP _hbmpProgBand;
  59. RECT _rcBand;
  60. INT _nBandOffset;
  61. HPALETTE _hPal;
  62. INT _nTimerID;
  63. };
  64. #endif // _progband_h_