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.

72 lines
1.6 KiB

  1. //-----------------------------------------------------------------------------
  2. //
  3. // File: _cancel.h
  4. // Copyright (C) 1994-1998 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. //-----------------------------------------------------------------------------
  8. #ifndef ESPUTIL__CANCEL_H
  9. #define ESPUTIL__CANCEL_H
  10. #pragma once
  11. #pragma warning(disable:4275 4251)
  12. class CCancelDialog;
  13. class LTAPIENTRY CCancelDisplay : public CCancelableObject
  14. {
  15. public:
  16. CCancelDisplay(CWnd *pParent = NULL);
  17. //
  18. // CCancelableObject methods.
  19. virtual BOOL fCancel(void) const;
  20. virtual void SetDescriptionString(const CLString &);
  21. virtual void SetCurrentTask(const CLString &);
  22. //
  23. // CProgressiveObject methods.
  24. virtual void SetProgressIndicator(UINT uiPercentage);
  25. ~CCancelDisplay();
  26. void SetDelay(clock_t);
  27. enum CancelButtonText { nCancel, nStop, COUNT_OF_ENUM };
  28. void SetCancelButtonText(CancelButtonText const nCancelButtonText);
  29. void DisplayDialog(BOOL);
  30. protected:
  31. friend CCancelDialog;
  32. void SetCancel(BOOL);
  33. void ChangeCancelButtonText();
  34. private:
  35. BOOL m_fCancel;
  36. CCancelDialog *m_pCancelDialog;
  37. CLString m_strDescription;
  38. CLString m_strTask;
  39. UINT m_uiLastPercentage;
  40. clock_t m_ctLastTime;
  41. clock_t m_ctDisplayTime;
  42. CancelButtonText m_nCancelButtonText;
  43. BOOL m_fDisplay;
  44. BOOL m_fWaitCursor;
  45. SmartPtr<CInputBlocker> m_spBlocker;
  46. CWnd *m_pParent;
  47. };
  48. #pragma warning(default:4275 4251)
  49. #if !defined(_DEBUG) || defined(IMPLEMENT)
  50. #include "_cancel.inl"
  51. #endif
  52. #endif // ESPUTIL__CANCEL_H