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.

62 lines
1.7 KiB

  1. // StatusProgress.h : Declaration of the CStatusProgress
  2. #ifndef __STATUSPROGRESS_H_
  3. #define __STATUSPROGRESS_H_
  4. #include "resource.h" // main symbols
  5. #define WM_KILLTIMER WM_USER + 10
  6. #define WM_STARTTIMER WM_USER + 11
  7. #define WM_UPDATEOVERALLPROGRESS WM_USER + 12
  8. /////////////////////////////////////////////////////////////////////////////
  9. // CStatusProgress
  10. class ATL_NO_VTABLE CStatusProgress :
  11. public CComObjectRootEx<CComSingleThreadModel>,
  12. public CComCoClass<CStatusProgress, &CLSID_StatusProgress>,
  13. public IDispatchImpl<IStatusProgress, &IID_IStatusProgress, &LIBID_WIZCHAINLib>
  14. {
  15. public:
  16. CStatusProgress() : m_pdispSD(NULL),
  17. m_hWndProgress(NULL),
  18. m_bOverallProgress(FALSE)
  19. {
  20. }
  21. ~CStatusProgress()
  22. {
  23. if (m_pdispSD)
  24. m_pdispSD->Release();
  25. }
  26. DECLARE_REGISTRY_RESOURCEID(IDR_STATUSPROGRESS)
  27. DECLARE_PROTECT_FINAL_CONSTRUCT()
  28. BEGIN_COM_MAP(CStatusProgress)
  29. COM_INTERFACE_ENTRY(IStatusProgress)
  30. COM_INTERFACE_ENTRY(IDispatch)
  31. END_COM_MAP()
  32. // IStatusProgress
  33. public:
  34. STDMETHOD(put_Text)(/*[in]*/ BSTR newVal);
  35. HRESULT Initialize(IDispatch * pdispSD, HWND hWnd, BOOL bOverallProgress);
  36. STDMETHOD(StepIt) ( long lSteps );
  37. STDMETHOD(put_Step) ( long newVal );
  38. STDMETHOD(put_Range) ( long newVal );
  39. STDMETHOD(get_Range) ( long* pVal );
  40. STDMETHOD(put_Position) ( long newVal );
  41. STDMETHOD(get_Position) ( long* pVal );
  42. STDMETHOD(EnableOnTimerProgress)( BOOL bEnable, long lFrequency, long lMaxSteps );
  43. private:
  44. IDispatch * m_pdispSD;
  45. HWND m_hWndProgress;
  46. BOOL m_bOverallProgress;
  47. };
  48. #endif //__STATUSPROGRESS_H_