Source code of Windows XP (NT5)
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.

85 lines
2.3 KiB

  1. // ImageDoc.h : interface of the CImageDoc class
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_IMAGEDOC_H__7318097E_E558_4694_BB26_89E044E0CE28__INCLUDED_)
  5. #define AFX_IMAGEDOC_H__7318097E_E558_4694_BB26_89E044E0CE28__INCLUDED_
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. class CImageDoc : public CDocument
  10. {
  11. protected: // create from serialization only
  12. CImageDoc();
  13. DECLARE_DYNCREATE(CImageDoc)
  14. // Attributes
  15. public:
  16. // Operations
  17. public:
  18. // Overrides
  19. // ClassWizard generated virtual function overrides
  20. //{{AFX_VIRTUAL(CImageDoc)
  21. public:
  22. virtual BOOL OnNewDocument();
  23. virtual void Serialize(CArchive& ar);
  24. virtual BOOL OnOpenDocument(LPCTSTR lpszPathName);
  25. virtual BOOL OnSaveDocument(LPCTSTR lpszPathName);
  26. //}}AFX_VIRTUAL
  27. // Implementation
  28. public:
  29. const CString& GetImagePathName() const;
  30. virtual ~CImageDoc();
  31. #ifdef _DEBUG
  32. virtual void AssertValid() const;
  33. virtual void Dump(CDumpContext& dc) const;
  34. #endif
  35. void SetTempFileName (const CString &strTempFile);
  36. protected:
  37. // Generated message map functions
  38. protected:
  39. //{{AFX_MSG(CImageDoc)
  40. afx_msg void OnFileScan();
  41. afx_msg void OnFileProperties ();
  42. afx_msg void OnFileSaveAs();
  43. afx_msg void OnFilePaperTile ();
  44. afx_msg void OnFilePaperCenter ();
  45. afx_msg void OnUpdateFileScan(CCmdUI* pCmdUI);
  46. afx_msg void OnUpdateFileMenu (CCmdUI* pCmdUI);
  47. // NOTE - the ClassWizard will add and remove member functions here.
  48. // DO NOT EDIT what you see in these blocks of generated code !
  49. //}}AFX_MSG
  50. DECLARE_MESSAGE_MAP()
  51. private:
  52. CString m_strTempPath;
  53. bool m_bUseTempPath;
  54. CComPtr<IWiaDevMgr> m_pDevMgr; // WIA
  55. bool bWIADeviceInstalled ();
  56. void SetWallpaper (bool bTile);
  57. void DelTempFile ();
  58. void GetDevMgr ();
  59. };
  60. /////////////////////////////////////////////////////////////////////////////
  61. //{{AFX_INSERT_LOCATION}}
  62. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  63. CString GetExtension (const TCHAR *szFilePath);
  64. void MySplitPath (const TCHAR *szPath, TCHAR *szDrive, TCHAR *szDir, TCHAR *szName, TCHAR *szExt);
  65. CString StripExtension(const TCHAR* szFilePath);
  66. #endif // !defined(AFX_IMAGEDOC_H__7318097E_E558_4694_BB26_89E044E0CE28__INCLUDED_)