dcsimg
September 23, 2018
Hot Topics:

An Image Viewer

  • July 28, 2000
  • By Developer.com Staff
  • Send Email »
  • More Articles »

Environment: Visual C++ 6.0 with Service Pack 3, Windows 9x, Windows NT 4.0 with Service Pack 6a and Windows 2000

This sample is an MFC application using the document/view architecture that can load, display and print graphics files like GIF, JPEG, BMP (bitmap), ICO (icon), WMF (metafile) and EMF (Win32-enhanced metafile). It shows

  • how to use the OleLoadPicturePath function and the IPicture interface to load and display those graphics files.

  • (Look into the ImgViewerDoc.cpp, ImgViewerView.cpp and MainFrm.cpp files.)
  • how to support more than one file extension per MFC document type.

  • (Look into the MulExtDocTmp.cpp, MulExtDocTmp.h and ImgViewer.cpp files.)

References:

Please see the following article in the Microsoft Knowledge Base:

Q218972 How To Load and Display Graphics Files w/LOADPIC.EXE
(Note that LOADPIC.EXE does not handle palettes. As a result, it won't display a 256-color image correctly in 256-color mode. Also, it uses the OleLoadPicture function instead of the OleLoadPicturePath function.)
Q141921 HOWTO: How to Support Two File Extensions per MFC Document Type
Q198538 DocMgrEx.exe Assoc Multiple File Extensions w/1 Doc Type

Downloads

Download Source Code - 22KB

Visit chensu at Expert's Exchange.






Comment and Contribute

 


(Maximum characters: 1200). You have characters left.

 

 


Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.

By submitting your information, you agree that developer.com may send you developer offers via email, phone and text message, as well as email offers about other products and services that developer believes may be of interest to you. developer will process your information in accordance with the Quinstreet Privacy Policy.

Sitemap

Thanks for your registration, follow us on our social networks to keep up-to-date