• vc编译错误pass it through SDKPAINT的处理方法


    vc编译错误pass it through SDKPAINT的处理方法

    在使用网上提供的图标给VC6使用,在编译的时候会提示“Error RC2176: old DIB in res\app.ico; pass it through SDKPAINT”,原因是这些图标里使用了压缩来缩小图标的尺寸。

    下文的意思就是用IconWorkshop工具,取消图标中的压缩,重新保存图标(图标会大很多),OK!一切搞定!VC6能够编译通过了。

    事实就这么简单。。。

    Windows Vista? PNG compressed 256x256 icons are supported in Microsoft Visual Studio? 2008. We've tested PNG compressed icons on Visual C++ 6.0 and Visual .NET 2003/2005 and they all reject the icon during the resource compilation:

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

    This is unsurprising to us since this new ICO file format introduces a new header which points to raw PNG data. Of course the compiler returns a false error message. The DIB header is not old, it is PNG. Passing it through SDKPAINT does not help.

    Windows Vista? compressed icons have also been reported as not functioning in the Delphi programming environment. New components will no doubt be developed in the future that identify these shortfalls.

    Creating a project using a 256x256 PNG icon with Visual C++ 6.0 and .NET 2003/2005

    Create a 256x256 icon with all formats embedded as recommended for Windows Vista?. Save your icon without compressing your 256x256 formats. If your icon already contains PNG compression (like the one we've created in the procedure above), follow this procedure:

    1. Open the icon file containing the PNG compressed formats icon in IconWorkshop.

    2. On the left side of the document window you see all the formats available. Locate the 256x256 formats which are compressed: A small overlay icon indicating the compression is displayed (error RC2176 : old DIB in res****.ico; pass it through SDKPAINT - 剑雨花心 - 曲郎博客). For each of them, do the following step:

    3. Right click on the format (in the list if available formats, not in the editor area). A menu opens, choose "PNG Compressed Image Format (Windows Vista)" to remove the compression.

    4. Save the icon. Redo the same procedure for all the 256x256 icons of the project.

    Once the icon is saved without compression, work on your project as usual. The compiler will handle the icon images correctly since they are not PNG. When your project is finished and before releasing the program file, follow the procedure below:

    1. Open the EXE file containing the uncompressed icon in IconWorkshop.

    2. The file opens in a document window with all the embedded icons displayed. Be sure to display all the formats in raw: choose "View/Display Icons/All Formats In Raw".

    3. Double-click on the icon you want to compress. It opens in another document window.

    4. In the list of available formats (vertical list on left), right-click on the first "256x256 RGB/A" format, a menu opens. Choose "PNG Compressed Image Format (Windows Vista)". A small overlay icon indicating the compression is displayed (error RC2176 : old DIB in res****.ico; pass it through SDKPAINT - 剑雨花心 - 曲郎博客).

    5. Repeat step 4 with the other 256x256 image formats (if any).

    6. Save the icon "File/Save". Close the icon window.

    7. Back in the EXE document window, you see the compression overlay icon (error RC2176 : old DIB in res****.ico; pass it through SDKPAINT - 剑雨花心 - 曲郎博客) displayed on all the 256x256 formats. Repeat steps 3 to 6 for all the other icons containing 256x256 images (if any).

    8. Save your EXE document, close the window.

    9. You're done! The EXE file size is smaller indicating that the compression is made.

  • 相关阅读:
    第一节 49_ref_out 简单
    第一节 38函数 简单
    第二节 2面向对像简介 简单
    第一节 42字符串基础 简单
    第二节 3属性 简单
    第一节 33enum枚举 简单
    Java jdbc 数据库
    css 使IE和FIREFOX下变为手型
    JS调用PageMethods
    USB设备量产导致通用串行总线控制器显示感叹号解决办法
  • 原文地址:https://www.cnblogs.com/yxsylyh/p/vciconerror.html
Copyright © 2020-2023  润新知