PageExport.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. #if !defined(AFX_PAGEEXPORT_H__89BB75C9_8F66_40A6_A933_36F74B782F10__INCLUDED_)
  2. #define AFX_PAGEEXPORT_H__89BB75C9_8F66_40A6_A933_36F74B782F10__INCLUDED_
  3. #if _MSC_VER > 1000
  4. #pragma once
  5. #endif // _MSC_VER > 1000
  6. // PageExport.h : header file
  7. //
  8. #include "Page.h"
  9. #include "PageData.h"
  10. #include "BaseObj.h"
  11. /////////////////////////////////////////////////////////////////////////////
  12. // CPageExport dialog
  13. class CPageExport : public CPage, CNVAPIExamplePage<CPageExport>
  14. , public BaseObj, public NeroVisionAPI::IProgressCallback
  15. {
  16. // Construction
  17. public:
  18. CPageExport(CSheet * pParentSheet); // standard constructor
  19. // Dialog Data
  20. //{{AFX_DATA(CPageExport)
  21. enum { IDD = IDD_EXPORT_PAGE };
  22. CStatic c_textTotalRemainTime;
  23. CStatic c_textTotalProgress;
  24. CStatic c_textCurrentRemainTime;
  25. CStatic m_textCurrentProgress;
  26. CProgressCtrl c_ProgressTotal;
  27. CProgressCtrl c_progressCurrent;
  28. //}}AFX_DATA
  29. // Overrides
  30. // ClassWizard generated virtual function overrides
  31. //{{AFX_VIRTUAL(CPageExport)
  32. protected:
  33. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  34. virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
  35. //}}AFX_VIRTUAL
  36. // Implementation
  37. bool Create (void);
  38. bool OnBack (void);
  39. bool OnNext (void);
  40. void OnChangeState (bool bActivate, bool bForward);
  41. void FormatTimeString(double secs, const TCHAR* format, TCHAR* buffer);
  42. IMPL_IUNKNOWN
  43. IMPL_INTERFACE(NeroVisionAPI::IProgressCallback)
  44. STDMETHODIMP raw_OnProgress (enum NeroVisionAPI::ProgressAction action, BSTR itemName,
  45. double currentRemain, double currentTotal, float currentFraction,
  46. double totalRemain, double totalTotal, float totalFraction);
  47. STDMETHODIMP raw_ShouldCancel(VARIANT_BOOL* pbCancel) ;
  48. protected:
  49. // Generated message map functions
  50. //{{AFX_MSG(CPageExport)
  51. // NOTE: the ClassWizard will add member functions here
  52. //}}AFX_MSG
  53. DECLARE_MESSAGE_MAP()
  54. private:
  55. bool m_bActiveState;
  56. HANDLE m_thread;
  57. _bstr_t m_exportFilename;
  58. bool m_IsAborting;
  59. CPageData* m_pageData;
  60. static DWORD WINAPI BeginThreadFunc(void* p);
  61. void ExportProcess();
  62. };
  63. //{{AFX_INSERT_LOCATION}}
  64. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  65. #endif // !defined(AFX_PAGEEXPORT_H__89BB75C9_8F66_40A6_A933_36F74B782F10__INCLUDED_)