Click here to Skip to main content
15,891,694 members
Please Sign up or sign in to vote.
4.33/5 (2 votes)
See more:
Hello, i want to draw png image on my MFC based dialog application.
Can anyone help me? THanks.
Posted

VC6 still had access to gDI+, I thought, via the platform SDK. GDI+ can load png, as well as jpg, gif, tiff.
 
Share this answer
 
You could use CImage[^].

From the description of the class in the documentation page:
none
CImage provides enhanced bitmap support, including the ability to load and save images in JPEG, GIF, BMP, and Portable Network Graphics (PNG) formats.
 
Share this answer
 
v3
Here[^] you will find a solution using GDI+ technology.

1) Create CStatic control on your dialog window, where image will be placed.

2) Use CImageCtrl class as instructed in steps from 1) to 4.1.3) in the first part of the section "Using the code".
 
Share this answer
 
v2
Comments
CHill60 30-Oct-15 8:11am    
I really hope the OP hasn't waited over 5 years for this response.
It's bad form to resurrect old questions just to post a link to your own article. Your article is out there, let people read it as they will.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900