Jump to content
  • Advertisement
Sign in to follow this  
ParticleGames

Changing the Icon of exe?

This topic is 2157 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've been messing around creating programs lately and I decided to change the icon of my program. I'm using a framework called OpenFrameworks, and it uses GLUT/OpenGL for graphics. I managed to change it by adding a rc script to my Visual Studio project that contains:

 

GLUT_ICON ICON src/glut.ico

 

This will change the icon. However, the same icon file will be used universally, so the icon image on the window of my application is shrunk down which causes extreme distortion, and the icon image on my task bar is stretched out. Is there a way to optimize these icons for the different locations they appear? Whether it's via rc scripting or any other route.

Edited by ParticleGames

Share this post


Link to post
Share on other sites
Advertisement
A single .ico file can contain multiple images for different resolutions. You just need to find an icon editor that supports this functionality and make the required images for the various necessary resolutions.

Share this post


Link to post
Share on other sites
Versions of IcoFX before version 2.0 were freeware. You should still be able to find version 1.6.4 online somewhere. It, too, is a lightweight icon editor that supports "packing." Edited by shuma-gorath

Share this post


Link to post
Share on other sites

So I've come to a half-solution, but I've become stumped again. I used Greenfish Icon Editor to create an icon with the sizes 16x16, 24x24, 32x32, 64x64, and 256x256. The icon almost works. I attached a picture because it's hard to verbally explain the error. It chooses the right icon for the text console, and the quick bar looks fine, but it looks like the GLUT window is trying to use the same one as the quick bar and it looks bad. My resource script is still the same. Here's what it looks like: 

qovpcw.jpg

Edited by ParticleGames

Share this post


Link to post
Share on other sites

You can set the small and large icons explicitly in the WNDCLASSEX struct when creating your window class.

Edited by Khatharr

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!