How to retrieve the file previews used by windows explorer in Windows vista and seven?

巧了我就是萌 提交于 2019-11-27 15:24:16

问题


I am developing a Delphi documents management application, so somehow I am giving the user some functionality similar to windows explorer.

I would like to know if there is a way to get the preview used by windows explorer. For example windows explorer creates a small thumbnail for a pdf document for example, and displays it when the user chooses to view "big icons". Is there a way to retrieve that preview?

MyTImage := GiveMePreviewForFile('C:\Test\File.pdf');

回答1:


@user193655, using the IExtractImage interface is the way to go, this interface exposes methods that request a thumbnail image from a Shell folder

you can find a very complete sample in this site and the source code is here.

check this image




回答2:


Take a look at the docs for IExtractImage. Basically you use IShellFolder with IExtractImage to get the picture you are looking for.



来源:https://stackoverflow.com/questions/2911837/how-to-retrieve-the-file-previews-used-by-windows-explorer-in-windows-vista-and

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!