Visual Studio 2008 resource editor is annoying with PNG’s

pngresource-filevisual-studio-2008

I have a resource DLL project in VS2008 that contains mostly PNG images. Every time I import a new image to the resource file, I get an RC2170 error: bitmap file is not 3.0 format, for every PNG that was previously in the resource file.

Thing is, all of those iamges have complied ok before I add the new image. Only after I remove all of those images from the resource file, and import them again (unchanged), it would compile.

This behavior repeats itself for every new PNG file added, and as the number of PNG files grows, it becomes increasingly annoying.

Anyone experienced anything similiar? Any solution?

BTW: I don't actually need the resource editor to recognize the PNG files as images, if that may solve this.

Best Solution

According to this thread, you are experience a bug in the resource editor which changes:

IDI_DENTIFIER PNG "background.png"
to:
IDI_DENTIFIER BITMAP "background.png"

But beware: these PNG resources do not seem to load on pre-Vista OS when called via LoadImage(). Using this resource type may limit your application to Vista.