What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » Display PNGs in c

Display PNGs in c
Author: Message:
TheGeek
Full Member
***

Avatar
Excuse my geekyness.

Posts: 179
Reputation: 15
34 / Male / –
Joined: Feb 2005
O.P. Huh?  Display PNGs in c
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 :(
[Image: 468x60banner.png]
01-11-2006 07:38 PM
Profile E-Mail PM Web Find Quote Report
RaceProUK
Elite Member
*****

Avatar

Posts: 6073
Reputation: 57
39 / Male / Flag
Joined: Oct 2003
RE: Display PNGs in c
libpng? I'm sure you could statically link it into your program.
[Image: spartaafk.png]
01-12-2006 11:39 AM
Profile PM Web Find Quote Report
TheGeek
Full Member
***

Avatar
Excuse my geekyness.

Posts: 179
Reputation: 15
34 / Male / –
Joined: Feb 2005
O.P. RE: RE: Display PNGs in c
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?
[Image: 468x60banner.png]
01-12-2006 06:20 PM
Profile E-Mail PM Web Find Quote Report
RaceProUK
Elite Member
*****

Avatar

Posts: 6073
Reputation: 57
39 / Male / Flag
Joined: Oct 2003
RE: Display PNGs in c
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.

This post was edited on 01-13-2006 at 03:52 PM by RaceProUK.
[Image: spartaafk.png]
01-13-2006 03:51 PM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On