Classic Shell
http://classicshell.net/forum/

Pick up an icon from a *.exe in toolbar button
http://classicshell.net/forum/viewtopic.php?f=8&t=659
Page 1 of 1

Author:  Horcrux7 [ Sat May 18, 2013 11:17 am ]
Post subject:  Pick up an icon from a *.exe in toolbar button

I want to use the icon from an exe file which I run with a custom toolbar button. But it does not work. The exe is cmd.exe. I can select the file because there is a *.exe filter for the icon file. But the list of icons is empty after selection the cmd.exe. Also if I use an empty icon setting it does not use the default from the *.exe.

I use the version version 3.6.7 on Windows 7.


Is this a bug, missing feature or do I something wrong?

Author:  Gaurav [ Sat May 18, 2013 11:41 am ]
Post subject:  Re: Pick up an icon from a *.exe in toolbar button

Icons in EXEs work fine. The problem is that the icon stored in cmd.exe has a string ID, and not a numeric ID. Classic Shell only supports numeric IDs. Try using the same icon from console.dll and it will work. :)

Author:  Jcee [ Sat May 18, 2013 6:44 pm ]
Post subject:  Re: Pick up an icon from a *.exe in toolbar button

well why does classic shell only support numeric ID's? XD, im sure this problem is ran into quite often, so it is something that should be fixed if possible :P

Author:  Ivo [ Sat May 18, 2013 6:51 pm ]
Post subject:  Re: Pick up an icon from a *.exe in toolbar button

The standard way to refer to an icon in the system is in the format "file,number". There are two ways to interpret the number - one is as index of an icon, and the other is as an ID of the icon. Using indices gives you access to all icons, including ones with string IDs. However the index can change between versions of Windows because icons are added and removed. So to keep the icons consistent between versions I elected to use IDs instead of indices.

There are very few icons that have string IDs. In fact I have not seen another one besides cmd.exe. So the downside is not as bad as you'd think.

Author:  Jcee [ Sat May 18, 2013 10:27 pm ]
Post subject:  Re: Pick up an icon from a *.exe in toolbar button

hmm, why does command.exe use it? for legacy sake?, thats the only reason i can think of.. or is it just some arbitrary thing..?

Author:  Horcrux7 [ Sun May 19, 2013 1:30 am ]
Post subject:  Re: Pick up an icon from a *.exe in toolbar button

Thanks for the workaround with console.dll. It works.

Page 1 of 1 All times are UTC - 8 hours [ DST ]
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/