Shoutbox

Display PNGs in c - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Skype & Technology (/forumdisplay.php?fid=9)
+---- Forum: Tech Talk (/forumdisplay.php?fid=17)
+----- Thread: Display PNGs in c (/showthread.php?tid=54856)

Display PNGs in c by TheGeek on 01-11-2006 at 07:38 PM

Hi,

I want to draw a PNG image to a DC, but I can't seen to find a way to do that.
I've already googled and found a method to draw bitmaps with a monochrome mask, but I want my image to be semi-transparent.

I've seen some plugins draw PNGs for their GUI (MsgPlus!, Stuffplug, Screenshot Sender, ...), so I was wondering if someone is willing to tell how they me did that?

PS: I'm using MSVC, and i don't things like c++, oop, mfc, external dll's, ... Plz don't shoot me :(


RE: Display PNGs in c by RaceProUK on 01-12-2006 at 11:39 AM

libpng? I'm sure you could statically link it into your program.


RE: RE: Display PNGs in c by TheGeek on 01-12-2006 at 06:20 PM

quote:
Originally posted by raceprouk
libpng? I'm sure you could statically link it into your program.

Well i thought libpng was only for reading and writing PNG data, not for displaying data...
And how do i statically link a dll?
RE: Display PNGs in c by RaceProUK on 01-13-2006 at 03:51 PM

libpng won't display data, but it should allow you to get an HBITMAP to it. Then you can use GDI to draw it.
And you don't statically link a DLL, you statically link a LIB. Make sure you compile libpng to a static library instead of a dynamic one, and you'll get a LIB you can link into your own progam.