在 VS 2005 中使用 Vista 图标的最简单方法?
我已经从网上为我正在开发的新应用程序下载了一个 Vista 图标。 当我尝试在 Visual Studio 2005 C++ 中编译它时,收到一条错误消息:
错误 RC2176:res\XXXXX.ico 中的旧 DIB; 通过SDKPAINT传递
错误消息似乎有点误导,我认为“旧 DIB”实际上是一种它没有预料到的新格式。 我从未听说过 SDKPAINT,搜索也没有发现它安装在我的系统上的任何位置。 Microsoft 声称 SDKPAINT 随 Windows 3.0 SDK 一起提供,但由于与我们的防火墙不兼容,我无法下载任何 SDK。
我真的不需要此图标中的任何 Vista 特定内容,因此任何可以转储不兼容位的内容都可以。
I've downloaded a Vista icon from the web for a new application I'm developing. When I try to compile it in Visual Studio 2005 C++, I get an error message:
error RC2176 : old DIB in res\XXXXX.ico; pass it through SDKPAINT
The error message seems a little misleading, I think the "old DIB" is actually a newer format that it wasn't expecting. I've never heard of SDKPAINT, and Search doesn't find it installed on my system anywhere. Microsoft claims SDKPAINT comes with the Windows 3.0 SDK, but I can't download any SDK due to incompatibilities with our firewall.
I don't really need anything Vista specific in this icon, so anything that would dump the incompatible bits would be fine.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我做了更多挖掘,发现了上一个问题:
您会推荐哪种图标编辑软件来为应用程序创建图标
建议该问题的接受答案IcoFX。 我下载了它并用它删除了 256x256 和 128x128 版本的图标,现在一切正常。
I did a little more digging, and I found this previous question:
Which Icon Editing Software would you recommend for creating icons for apps
The accepted answer for that question suggested IcoFX. I downloaded that and used it to delete the 256x256 and 128x128 versions of the icon, and now everything's fine.
在 Visual Studio 2005 中还有两种方法可以实现此目的:
rc.exe
和rcdll.exe
替换为较新 SDK 中的内容(例如Windows Vista、7 ...) 或 DDK/WDK(同上)资源编译器是创建
.res 文件,然后使用通常的 Visual Studio 2005 链接器(使用第一个选项)或 SDK 工具链的衬垫将其链接到二进制文件中。 这意味着即使在不赞成整体升级工具链的保守情况下,这也应该是无害的。
There are two more ways to achieve this in Visual Studio 2005:
rc.exe
andrcdll.exe
of your Visual Studio 2005 installation with the ones from a newer SDK (e.g. Windows Vista, 7 ...) or DDK/WDK (ditto)The resource compiler is the part that creates the
.res
files and then the usual Visual Studio 2005 linker (with the first option) or the SDK tool chain's liner links that into the binary. Meaning that even in conservative scenarios where it is frowned upon to upgrade the tool chain as a whole, this should be harmless.