views:

14

answers:

1

I would want to display two button images on an application, bot images are irregular in shape (a circle and moon shape images). Since bitmaps doesn't supports transparency, this buttons looks like they are overlapping each other even when the exact design doesn't. SO I would like to ask:

Is there a way to display a PNG image on VC++ MFC?

If not, is there a way to do this transparency?

Thanks

EDIT: Through google I found out that using GDI+ might be be used to add jpeg and png. Also these image types could be also added to resources. The current code loads the bitmaps to the CButton Handles and displays it. Is there a way to pass the PNG images to CButton Handles and display it like the Bitmaps? Thanks Again!

A: 

There is libpng you could compile in as native code and then use it to load PNG files to memory, see http://ojuice.teamslack.net/2008/03/code/compiling-libpng-in-visual-studio-net-2005/.

You may also find HTMLayout interesting. Such layouts are made easily with it. .NET wrapper is available at http://code.google.com/p/nabu-library/.

synhershko
Sorry, Well I forgot to include some info about this, I'm using VC++ 2003. We just need to edit the skins(GUI) of this and it seems that this version was the closest version to use for re-compiling.
ajems