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.

66 lines
1.4 KiB

  1. /*++
  2. Copyright (c) Microsoft Corporation. All rights reserved.
  3. Module Name:
  4. Progress.h
  5. Abstract:
  6. Definition of the old style progress
  7. bar class.
  8. Notes:
  9. ANSI only - must run on Win9x.
  10. History:
  11. 01/30/01 rparsons Created (Thanks to carlco)
  12. --*/
  13. #include <windows.h>
  14. #include <strsafe.h>
  15. class CProgress {
  16. public:
  17. CProgress();
  18. ~CProgress();
  19. int
  20. CProgress::Create(IN HWND hWndParent,
  21. IN HINSTANCE hInstance,
  22. IN LPSTR lpwClassName,
  23. IN int x,
  24. IN int y,
  25. IN int nWidth,
  26. IN int nHeight);
  27. DWORD GetPos() { return m_dwPos; }
  28. void Refresh();
  29. DWORD SetPos(IN DWORD dwNewPos);
  30. void SetMax(IN DWORD dwMax);
  31. void SetMin(IN DWORD dwMin);
  32. private:
  33. HBRUSH m_hBackground;
  34. HBRUSH m_hComplete; //the color of the completed portion.
  35. HFONT m_hFont;
  36. DWORD m_dwPos;
  37. DWORD m_dwMin;
  38. DWORD m_dwMax;
  39. HWND m_hWndParent;
  40. HWND m_hWnd;
  41. static LRESULT CALLBACK WndProc(IN HWND hWnd,
  42. IN UINT uMsg,
  43. IN WPARAM wParam,
  44. IN LPARAM lParam);
  45. void OnPaint();
  46. void CorrectBounds();
  47. };