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.

63 lines
1.9 KiB

  1. #pragma once
  2. extern _ATL_FUNC_INFO StateChangeInfo;
  3. class CExportProgress : public CPropertyPageImpl<CExportProgress>,
  4. public IDispEventSimpleImpl<1, CExportProgress, &__uuidof( _IExportEvents )>
  5. {
  6. typedef CPropertyPageImpl<CExportProgress> BaseClass;
  7. public:
  8. enum{ IDD = IDD_WPEXP_PROGRESS };
  9. //static const int PROGRESS_MAX = 10000; // ProgressBar steps
  10. static const UINT MSG_COMPLETE = WM_USER + 1; // Indicates export is completed
  11. BEGIN_MSG_MAP(CExportProgress)
  12. MESSAGE_HANDLER( MSG_COMPLETE, OnExportComplete );
  13. CHAIN_MSG_MAP(BaseClass)
  14. END_MSG_MAP()
  15. BEGIN_SINK_MAP( CExportProgress )
  16. SINK_ENTRY_INFO( 1, __uuidof( _IExportEvents ), 1/*dispid*/, OnStateChange, &StateChangeInfo )
  17. END_SINK_MAP()
  18. CExportProgress ( CWizardSheet* pTheSheet );
  19. BOOL OnSetActive ( void );
  20. BOOL OnQueryCancel ( void );
  21. LRESULT OnExportComplete( UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled );
  22. // Event from the COM object for progress indications
  23. VARIANT_BOOL __stdcall OnStateChange( enExportState State,
  24. VARIANT vntArg1,
  25. VARIANT vntArg2,
  26. VARIANT vntArg3 );
  27. private:
  28. void AddStatusText ( UINT nID, LPCWSTR wszText = NULL, DWORD dw1 = 0, DWORD dw2 = 0 );
  29. void SetCompleteStat ( void );
  30. void GetOptions ( LONG& rnSiteOpt, LONG& rnPkgOpt );
  31. static unsigned __stdcall ThreadProc( void* pCtx );
  32. public:
  33. CString m_strExportError;
  34. private:
  35. CWizardSheet* m_pTheSheet;
  36. CString m_strTitle;
  37. CString m_strSubTitle;
  38. LONG m_nExportCanceled; // 1 = canceled, 0 = not canceled
  39. TStdHandle m_shThread;
  40. CProgressBarCtrl m_ProgressBar;
  41. };