Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Damocles

Weird icon problem

This topic is 5739 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

So I tried to make an icon for my program''s executable file. As I understood it, you simply create the icon and import it as a resource. If it''s the first icon resource found then windows will use the icon. So I did just that, I made an icon, imported it as a resource (it''s the only resource in the project ) and rebuilt, but the icon doesn''t show up in windows, I just get the regular .exe style icon. Have I done something wrong or is it a problem specific to Visual Studio 6?

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
just asking the obvious, to make sure we understand what''s going on:

by "but the icon doesn''t show up in windows", do you mean the icon is not used to display your exe file in explorer? or at runtime in the Alt+Tab window and as your window''s sysbox''s icon you''re getting the default icon instead of your app''s icon?

when you rebuilt, did you see a resource compiler step that was successful? if you don''t have a resource compiler step then you need to add the .rc file that the IDE created, to your project. you should also have a resources tab in the project''s workspace window and from there you should be able to select the icon and open it up for editing within the IDE.

if you want the icon to show up when Alt+Tabbing and as your window''s sysbox icon, then try sending the WM_SETICON msg to the window as part of its WM_CREATE msg processing.

also, sometimes explorer has problems switching icons for files, although i''ve never seen this happen with a file that''s using the default icon for display. a workaround for this problem is to rebuild the icon cache. there are several apps on the ''net that will do this for you.

Share this post


Link to post
Share on other sites
Must have been something dodgy with the icon file (which I extracted from another file for testing purposes)...I made a different icon from scratch and it worked first time.

Share this post


Link to post
Share on other sites

  • 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!