How to retrieve the file icons and file previews used by windows explorer?
Posted
by user193655
on Stack Overflow
See other posts from Stack Overflow
or by user193655
Published on 2010-05-26T09:55:10Z
Indexed on
2010/05/26
10:11 UTC
Read the original article
Hit count: 253
delphi
|native-methods
I am developing a Delphi documents management application, so somehow I am giving the user some functionality similar to windows explorer.
Currently I am using imagelists where I manually maintain the icons (like one for pdf, one for xls, ...) and when I need to display an icon for a filetype that I don't explicitly support I have a generic icon. Is there a way to retrieve the icon used by windows, like
MyTImage := GiveMeDefaultIconForExtension('pdf');
In Vista and Seven this should be an icon with multiple resolutions I think.
Moreover 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');
© Stack Overflow or respective owner