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.

44 lines
853 B

  1. // Copyright (C) Microsoft Corporation 1996-1997, All Rights reserved.
  2. #if _MSC_VER > 1000
  3. #pragma once
  4. #endif
  5. #ifndef _CPROGRESS_H_
  6. #define _CPROGRESS_H_
  7. #include <commctrl.h>
  8. // Creates a progress window
  9. class CProgress
  10. {
  11. public:
  12. CProgress(PCSTR pszTitle, HWND hwndParent = NULL, int steps = -1, int cHowOften = 1);
  13. ~CProgress();
  14. void CreateTheWindow(void); // called automatically after 1.5 seconds
  15. void SetPosition(int position) {
  16. if (hwndProgress)
  17. SendMessage(hwndProgress, PBM_SETPOS, (WPARAM) position, 0);
  18. };
  19. void Progress(void);
  20. HWND hwndFrame;
  21. HWND hwndProgress;
  22. protected:
  23. RECT rc;
  24. DWORD dwStartTime;
  25. HWND hwndParent;
  26. int steps;
  27. PSTR pszTitle;
  28. BOOL fWindowCreationFailed;
  29. int cProgress;
  30. int cFrequency;
  31. int counter;
  32. };
  33. #endif // _CPROGRESS_H_