 |
|
How to compile Windows Vista icons?January 28th 2006 |
This article explains basic properties of Windows Vista icons and describes how to
use Vista icons in your applications.
Find more information about Vista icons in an article
explaining differences between XP and Vista icons.
Vista icons
Windows Vista icons contain a high resolution 256x256 pixels images. These images are used exclusively
by Vista and they are stored using PNG-based compression. Explorer dynamically resamples them to required
resolution.

An icon with Vista image format. Large resolution makes it possible to add an additional effect - a projected shadow. You may download this icon here.
Compiling Vista icons
Although numerous dynamic libraries and executables in the current Vista build contain compressed icons,
Visual Studio (including VS2005) resource compiler refuses to accept them and aborts with:
"error RC2176 : old DIB in VistaIcon.ico; pass it through SDKPAINT".
Solution
It is hard to guess when or how is Microsoft going to address this issue. Right now, it is necessary to
use alternate resource compiler, manager, or tool.
The following tool was prepared to deal with the problem. It has a very simple command-line interface and you
can integrate it into your build process as a post-build step. The tool can replace or add an icon into
an executable file using the Windows resource API.
Download the tool from here: ReplaceVistaIcon.exe
The tool accepts two to four arguments:
ReplaceVistaIcon.exe executable.dll icon.ico [icon_ID [language_code]]
Note: If you have an exe file with multiple icons, Windows Explorer uses the first icon as the
application icon when browsing folders or in start menu. Compile your application with an XP-compatible icon and then replace
it using the tool. Although the tool is able to add new icon into an executable, it would add it at the end of icon list
and Windows Explorer would ignore it.
Conclusion
If you have experience with Vista icons in other build environments such as gcc, Delphi, or Builder,
please share your knowledge and add a comment below.
Resources
RealWorld Icon Editor homepage.
Recent Comments
|
Display all comments.
on July 2nd 2007
on July 3rd 2007
on December 2nd 2007
reference:
http://www.msdner.com/windows-networking/
on February 18th 2008
on February 18th 2008
on February 19th 2008
on October 20th 2008
on February 10th 2009
then run VCIntegrate. This should fix the Vista compilation problem
on May 6th 2009
on May 7th 2009