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.8 KiB

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