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.

67 lines
2.2 KiB

  1. #ifndef _INC_DSKQUOTA_PROGRESS_H
  2. #define _INC_DSKQUOTA_PROGRESS_H
  3. ///////////////////////////////////////////////////////////////////////////////
  4. /* File: progress.h
  5. Description: Declarations for class ProgressDialog. Any derivative
  6. classes should also be declared here.
  7. Revision History:
  8. Date Description Programmer
  9. -------- --------------------------------------------------- ----------
  10. 05/28/97 Initial creation. BrianAu
  11. */
  12. ///////////////////////////////////////////////////////////////////////////////
  13. class ProgressDialog
  14. {
  15. private:
  16. UINT m_idDialogTemplate;
  17. UINT m_idProgressBar;
  18. UINT m_idTxtDescription;
  19. UINT m_idTxtFileName;
  20. HWND m_hwndProgressBar;
  21. BOOL m_bUserCancelled;
  22. static INT_PTR CALLBACK DlgProc(HWND, UINT, WPARAM, LPARAM);
  23. INT_PTR SendToProgressBar(UINT, WPARAM, LPARAM);
  24. protected:
  25. virtual INT_PTR HandleMessage(HWND, UINT, WPARAM, LPARAM);
  26. virtual INT_PTR OnInitDialog(HWND, WPARAM, LPARAM);
  27. virtual INT_PTR OnDestroy(HWND);
  28. virtual INT_PTR OnCancel(HWND, WPARAM, LPARAM);
  29. public:
  30. HWND m_hWnd;
  31. ProgressDialog(UINT idDialogTemplate,
  32. UINT idProgressBar,
  33. UINT idTxtDescription,
  34. UINT idTxtFileName);
  35. ~ProgressDialog(VOID);
  36. UINT DialogID(VOID)
  37. { return m_idDialogTemplate; }
  38. BOOL UserCancelled(VOID)
  39. { return m_bUserCancelled; }
  40. virtual BOOL Create(HINSTANCE hInstance, HWND hwndParent);
  41. virtual VOID Destroy(VOID);
  42. virtual BOOL ProgressBarInit(UINT iMin, UINT iMax, UINT iStep);
  43. virtual UINT ProgressBarReset(VOID);
  44. virtual UINT ProgressBarAdvance(UINT iDelta = (UINT)-1);
  45. virtual UINT ProgressBarSetPosition(UINT iPosition);
  46. virtual VOID FlushMessages(VOID);
  47. virtual VOID SetTitle(LPCTSTR pszTitle);
  48. virtual VOID SetDescription(LPCTSTR pszDescription);
  49. virtual VOID SetFileName(LPCTSTR pszFileName);
  50. virtual VOID Show(VOID);
  51. virtual VOID Hide(VOID);
  52. };
  53. #endif // _INC_DSKQUOTA_PROGRESS_H