views:

1600

answers:

1

Hello,

I would like to be able to import png file inside of Visual Studio Resource Editor so as to be able to use the embedded resource in different other projects . Is there a solution for that? I know that it works for bitmaps but i am interested in the pngs because of the "transparency" that is availble even on lower format [16x16] or [32x32] (but lacks for bitmaps). Any ideas? Thank you.

+1  A: 

With VS 2008 you can import pngs and they will be recognized as an image, ie you will able to "see" it, but you will not be able to modify with within the resource editor.

But anyway the problem is that they will no be treated as bitmaps, so you can't embedded it inside a dialog. But you can access it with the usual FindResource/LockResource.

Also as MFC relies on GDI and it doesn't support natively PNG (at least on XP, I didn't try on Vista or Win7) you will need to convert them to BMP anyway. Here Gdi+ can be helpful.

Also I didn't check on VS 2010, perhaps worth a try if it have a better C++ resource editor.

Ismael