Reputation: 431
I want to add an icon to my application. I have added an icon resource. and its working file for the first icon. That means after I have compiled, the 16x16 icon of the exe file is same as the icon file used. but when the explorer window is zoomed to large icon size, then the icon of the exe file vanishes and another blank default icon is displayed.
How to set icon for large as well as small size display?
Upvotes: 6
Views: 13711
Reputation: 244672
From your comments, it sounds like you have multiple icon files set for your project. That's not going to work the way you want, or at least it's the really hard way of doing it.
The simple way is to let the operating system handle it for you. Create a single icon file that contains multiple icon sizes. 16x16, 32x32, 48x48, and 256x256 are the minimum sizes needed for current versions of Windows, but you can certainly add more (like 24x24 or 128x128) to improve pixel fidelity at those sizes if desired.
You can use Visual Studio to create the icons. Opening an .ico
file should automatically open its icon resource editor. But I personally find it difficult or cumbersome to use. I highly recommend using a third-party program like IcoFX to create your icons and push pixels around.
Upvotes: 6