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.

51 lines
1.6 KiB

  1. #ifndef _DOCFILE_H
  2. #define _DOCFILE_H
  3. class CDocFileThumb : public IExtractImage,
  4. public IPersistFile,
  5. public CComObjectRoot,
  6. public CComCoClass< CDocFileThumb,&CLSID_DocfileThumbnailHandler >
  7. {
  8. public:
  9. CDocFileThumb();
  10. ~CDocFileThumb();
  11. BEGIN_COM_MAP( CDocFileThumb )
  12. COM_INTERFACE_ENTRY( IExtractImage )
  13. COM_INTERFACE_ENTRY( IPersistFile )
  14. END_COM_MAP( )
  15. DECLARE_REGISTRY( CDocFileThumb,
  16. _T("Shell.ThumbnailExtract.Docfile.1"),
  17. _T("Shell.ThumbnailExtract.DocFile.1"),
  18. IDS_DOCTHUMBEXTRACT_DESC,
  19. THREADFLAGS_APARTMENT);
  20. DECLARE_NOT_AGGREGATABLE( CDocFileThumb );
  21. // IExtractThumbnail
  22. STDMETHOD (GetLocation) ( LPWSTR pszPathBuffer,
  23. DWORD cch,
  24. DWORD * pdwPriority,
  25. const SIZE * prgSize,
  26. DWORD dwRecClrDepth,
  27. DWORD *pdwFlags );
  28. STDMETHOD (Extract)( HBITMAP * phBmpThumbnail);
  29. // IPersistFile
  30. STDMETHOD (GetClassID)(CLSID * pCLSID );
  31. STDMETHOD (IsDirty)(void);
  32. STDMETHOD (Load)(LPCOLESTR pszFileName, DWORD dwMode);
  33. STDMETHOD (Save)(LPCOLESTR pszFileName, BOOL fRemember);
  34. STDMETHOD (SaveCompleted)(LPCOLESTR pszFileName);
  35. STDMETHOD (GetCurFile)(LPOLESTR * ppszFileName);
  36. protected:
  37. LPWSTR m_pszPath;
  38. SIZE m_rgSize;
  39. DWORD m_dwRecClrDepth;
  40. BITBOOL m_fOrigSize : 1;
  41. };
  42. #endif