Search code examples
c++visual-studiomfcwindowpreview

How to implement previews on windows using visual studio and MFC C++


We have our proprietary file format. Visual studio MFC desktop application (native C++ mostly) renders it on screen. How to implement preview for the file. By preview I mean the preview that we get in explorer (e.g. for word or bmp files) Which interface needs to be implemented? Any input on where to get started will be useful.


Solution

  • By preview I mean the preview that we get in explorer (e.g. for word or bmp files) Which interface needs to be implemented?

    From your description, it sounds like you are asking for a Shell Extension. In particular, you should investigate the Thumbnail Provider. It exposes the IThumnailProvider interface to make it easy to implement a thumbnail handler.

    Take a look at C++ Windows Shell thumbnail handler (CppShellExtThumbnailHandler) for some sample code.