Error RC2176: old DIB in res \ icon3.ico; pass it through SDKPAINT?

what is this error, and how to solve it? I am using Visual Studio 2005 to develop MFC smart devices. Upgrading to 2008 may solve my problem.

Error 85 error RC2176: old DIB in res \ icon3.ico; pass it through SDKPAINT

thanks

+4
source share
6 answers

this can help you: http://www.axialis.com/tutorials/vistaicons.html

It looks like vista badges now use PNG headers. The error is a bit false, although since its not an old DIB, it is just a header that it does not recognize, PNG.

How was this icon created? Once upon a time, Visual C ++ 6.0 had its own little way to create .ico files. Probably not using PNG, so this might be the way to go is to find some kind of program to emulate this and create an icon using the old DIB method. Or upgrade to 2008 :)

+6
source

Actually there is another way not mentioned here in other answers.

If you install and integrate a more recent (same or later release date than VS 2008) SDK with VS 2005, which will also enable it. You can also go to C:\Program Files\Microsoft Visual Studio 8\VC\bin (or your equivalent path) and replace the rcdll.dll and rc.exe with those obtained from a later VS, WDK or SDK.

Side note: the versions of rcdll.dll and rc.exe should match, that is, you need to copy both from your source (be it VS, WDK or SDK). Any version worked for me, starting with 6.0 or 6.1. This is any version, starting with the compilers that accompanied the Vista SDK and VS versions or later.

+2
source

I had this problem in VS2012, for which I googled, but did not find anything other than this link to the MSDN site, which talked about opening it with sdk-paint, so in my project I double-clicked the icon that was responsible for the error and deleted the PNG format and the voila program.

Greetz

Richard

+1
source

There are actually two situations that led to this RC2176 error.
As you probably know, a Windows.ICO file can contain several images for different sizes and color depths. VS2005 throws this error in at least two situations (not related to the DIB)

  • . PNG images in the icon (as described in Codejoy's answer)
  • 256x256 or more images in the icon

Using GIMP to reduce the maximum image size to 128x128 and avoid .PNG, the problem is solved with VS2005. Or, switch to a new VS;)

0
source

There is another situation that I encountered that caused an error, i.e. a damaged PNG file. I used the sed command to globally replace some lines in the project folder, and it just replaced the windows line (looks like this) ending in UNIX, which caused damage to my image files.

So, maybe there are some errors in the MFC PNG parser that cannot handle invalid input files.

0
source

Compressed / packed 256x256 was a problem for me. As soon as I disabled the option to save in compressed form (for Vista) in the icon editing application, the problem disappeared.

0
source

All Articles