Changing Icon displayed by Windows Explorer for MFC program
-
Greetings, I have modified the icon file for my program (res\myprog.ico) but I am still getting that old MFC "3 cubes" icon displayed in the title bar and as the icon for the executable file in Explorer. Is there some secret trick to getting that new icon used? Oddly, if I right-click on the executable's icon in Windows Explorer and bring up the properties dialog, the new icon is displayed, so I obviously did something right. Just not enough. Can some kind soul please point out the steps to fix this? Thanks!
-
Greetings, I have modified the icon file for my program (res\myprog.ico) but I am still getting that old MFC "3 cubes" icon displayed in the title bar and as the icon for the executable file in Explorer. Is there some secret trick to getting that new icon used? Oddly, if I right-click on the executable's icon in Windows Explorer and bring up the properties dialog, the new icon is displayed, so I obviously did something right. Just not enough. Can some kind soul please point out the steps to fix this? Thanks!
Heh, I remember this happened to me when I wrote my first MFC program. Ah, the old days... :) Anyway, there are two common sizes of icons displayed. 16x16 pixels and 32x32 pixels. You have apparently changed only one of them, which is the reason why you see the updated one in the properties dialog box and the old on in the explorer view. There is a small drop down right above the space where you edit your icon when you have it open, labelled "Device". Select the size you want from there and edit it. You can even insert icons of new sizes by clicking on the small "New Device Image" icon next to the drop down. Save and build, and lo and behold, your new icon shows up now.
Regards,Rohit Sinha
-
Heh, I remember this happened to me when I wrote my first MFC program. Ah, the old days... :) Anyway, there are two common sizes of icons displayed. 16x16 pixels and 32x32 pixels. You have apparently changed only one of them, which is the reason why you see the updated one in the properties dialog box and the old on in the explorer view. There is a small drop down right above the space where you edit your icon when you have it open, labelled "Device". Select the size you want from there and edit it. You can even insert icons of new sizes by clicking on the small "New Device Image" icon next to the drop down. Save and build, and lo and behold, your new icon shows up now.
Regards,Rohit Sinha
Bless you! That did it! Jeez! Once you told me the secret, it took me all of 60 seconds to fix it. Thank you very much!
-
Greetings, I have modified the icon file for my program (res\myprog.ico) but I am still getting that old MFC "3 cubes" icon displayed in the title bar and as the icon for the executable file in Explorer. Is there some secret trick to getting that new icon used? Oddly, if I right-click on the executable's icon in Windows Explorer and bring up the properties dialog, the new icon is displayed, so I obviously did something right. Just not enough. Can some kind soul please point out the steps to fix this? Thanks!
Icons come in different sizes (32x32, 16x16, etc.) and color depths (16 colors, 256, ...). Windows picks which one to display based upon what's needed. You need to make sure you change all of the versions in your resource.
Software Zen:
delete this;
-
Icons come in different sizes (32x32, 16x16, etc.) and color depths (16 colors, 256, ...). Windows picks which one to display based upon what's needed. You need to make sure you change all of the versions in your resource.
Software Zen:
delete this;
Thanks.