MFC-extension WIC File Dialogs

A previous article showed how to enumerate WIC (Windows Imaging Component) codecs, that are available in system.
Now, let’s use the codecs list in order to make File Open and File Save As dialogs which are dealing with WIC-compliant image files, i.e. having “File of type” filter list according to available WIC codecs (see the images, below).

WIC Open File Dialog

WIC Open File Dialog

 

WIC Save As File Dialog

WIC Save As File Dialog

CWICFileDialog class

CWICFileDialog is derived from CFileDialog MFC class. It basically overrides CFileDialog::DoModal and constructs the file types filter.

For implementation details, download the demo project attached here.

Demo project

The demo project is just a simple dialog-based MFC application that uses CWICFileDialog. It does nothing else but only shows the file dialogs.
Of course, in practice, you can use CWICFileDialog class in more complex applications like image file viewers, image file converters, and so on.

Resources

See also

Downloads

Leave a Reply