How do I show thumbnails of files in my application in Windows Explorer? [closed]

-1

I have an application that uses its own file format (for example, a .xyz extension, being a proper format of my application).

Note that when I have a PDF, Explorer shows thumbnails, When I have videos and pictures, too. I would like the same functionality for the mentioned .xyz files associated with my application.

What is the way to generate these thumbnails, so that Windows displays them? Is it any specific API?

    
asked by anonymous 08.10.2016 / 20:21

1 answer

3

Windows Explorer is responsible for displaying the icons and thumbnails, and has several features that can be added by third-party applications. What you are looking for, are the ...

Shell Extensions

Shell Extensions , as the name says, can be implemented to add functionality in the OS.

They are basically implemented as COM interfaces, and entry points are defined in the Windows API.

For C #, a starting point is this:
link

Some examples of the features:

File Thumbnails

They can be associated with certain extensions or CLSID, which is what you are looking for.

PreviewHandlers

Theywouldbearelevantcomplementforthethumbnails,sinceitwilldothethumbnailsoficons,itwouldbenicetotakeadvantageofthelogictodisplayinthepreviewpaneofthewindowitself:

Overlay of icons

Synchronization programs with external storage, or applications such as TortoiseGit, may display a small indicator on the application icon to show if the file is synchronized, for example;

Propertysheets

Newpagesinthefileproperties:haveextensionstoWindowsthatallowchangingfiledates,detectionofalternativeNTFSstreams,etc.

I will not go into detail about the implementation itself, because it depends a lot on the language used.

As a companion reading, there is a very interesting series in the Code Project, made for .NET, at this address (which is where the response images came from):

link

    
09.10.2016 / 02:20