none
error RC2176 : old DIB in SampleApp.ico; pass it through SDKPAINT

    Question


  • I'm trying to compile some .rc files in Visual Studio 2008, under Windows XP.
    I obtained the following error messages:

    3>Compiling resources...
    3>Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
    3>Copyright (C) Microsoft Corporation.  All rights reserved.
    3>.\SampleApp.rc(61) : error RC2176 : old DIB in SampleApp.ico; pass it through SDKPAINT
    3>Build log was saved at "file://z:\Tools\OpenSources\SpeechRecognition\Julius\julius4\msvc\SampleApp\Debug\BuildLog.htm"
    3>SampleApp - 1 error(s), 0 warning(s)
    ========== Rebuild All: 2 succeeded, 1 failed, 0 skipped ==========
    

    What is wrong with the "SampleApp.ico" file? I googled a bit, but can't find a ultimate solution yet.



    Best Regards
    JIA
    Welcome to Vision Open http://www.visionopen.com
    Thursday, October 22, 2009 6:23 AM

Answers

  • VS 2008 Documentation regarding error RC2176
    "An old format Device Independent Bitmap was found in the specified file. It should be converted to the current format. The SDKPAINT application provided in the Windows 3.0 SDK, or an equivalent application, can be used to do this."

    • Marked as answer by Wesley Yao Wednesday, October 28, 2009 3:52 AM
    Thursday, October 22, 2009 11:16 AM
  • This error means your icon file doesn't match the format, rc.exe doesn't support over 256-colors or PNG-based icon, you need to transform it with a icon replacement tool.

    Sincerely,
    Wesley
    Please mark the replies as answers if they help and unmark them if they provide no help. Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Marked as answer by Wesley Yao Wednesday, October 28, 2009 3:52 AM
    Monday, October 26, 2009 4:55 AM

All replies

  • VS 2008 Documentation regarding error RC2176
    "An old format Device Independent Bitmap was found in the specified file. It should be converted to the current format. The SDKPAINT application provided in the Windows 3.0 SDK, or an equivalent application, can be used to do this."

    • Marked as answer by Wesley Yao Wednesday, October 28, 2009 3:52 AM
    Thursday, October 22, 2009 11:16 AM
  • This error means your icon file doesn't match the format, rc.exe doesn't support over 256-colors or PNG-based icon, you need to transform it with a icon replacement tool.

    Sincerely,
    Wesley
    Please mark the replies as answers if they help and unmark them if they provide no help. Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Marked as answer by Wesley Yao Wednesday, October 28, 2009 3:52 AM
    Monday, October 26, 2009 4:55 AM
  • I get same error with an alpha channel packed icon. It's not important whatever the icons are PNG-based or DIB/BMP-based after they are layered in ICO format, since Windows XP adds support for 32-bit/pixel (16.7 million colors plus alpha channel transparency) icon images, thus allowing semitransparent areas like shadows, anti-aliasing, and glass-like shapes to be drawn in an icon.

    Note that this feature was supported in past but only activated when the users installed a new display driver or updated Internet Explorer to version 5.5 or 6.

    Then Windows Vista and Windows 7 supports (but does not require) the 32-bit color depth with 8-bit transparency alpha channel icons. But since latest Resource Compiler version does not support building a resourse file, and then object, from icon files with packed layers, I gues there is a trick used to pack the icons for example in Windows Accessories WordPad.exe were we have the 256x256px 32bpp icon layer packed.

    Any link on another way how to complile a resourse file with the 256x256x32bpp layer packed, or on how to pack the layer after the res ojbect is linked into a executable if is the case, will help here.


    Mx-Publisher CMS Development Team



    Thursday, September 01, 2011 7:54 PM