Start menu icon not showing if usercmd button is set with <iconlib>,<index>

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
Stiltzkin
Member
Member
Posts: 193
Joined: 2004-09-10, 17:15 UTC

Start menu icon not showing if usercmd button is set with <iconlib>,<index>

Post by *Stiltzkin »

for example:
any usercmd.ini em_ command

Code: Select all

button=test.ico
-> will be displayed in buttonbar and start menu

Code: Select all

button=shell32.dll,162
will display the icon in the buttonbar, but not the start menu
(same with *.icl or *.dll)
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 49881
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Start menu icon not showing if usercmd button is set with <iconlib>,<index>

Post by *ghisler(Author) »

This is actually intentional: Icons in the start menu are only shown if they are either
1. in an .ico file, or
2. in the wcmicons.dll (then it will be loaded from the currently chosen substitute if using an icon library)
This is done because menu icons are not cached, and loading them from arbitrary dlls and exe files is VERY slow with some virus scanners (up to several seconds per file). There is a button labeled "->.ico" in the dialog to extract the icon and put it in a .ico file for that purpose.

Button bar icons are cached in the .br2 files, but this means that changing the bar can be very slow, so I didn't use that approach for the menu.
Author of Total Commander
https://www.ghisler.com
User avatar
AntonyD
Power Member
Power Member
Posts: 1453
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: Start menu icon not showing if usercmd button is set with <iconlib>,<index>

Post by *AntonyD »

2ghisler(Author)
And what rules are used to extract icons? In what format are they saved?
And in what format is the entry `button=<path_to-ICO>` pointing to the icon file supported?
I mean, icons in most cases are SETS of icons with different resolutions and a bit depths.
And that's how this fact is supported by the Total anywhere?
#146217 personal license
User avatar
nsp
Power Member
Power Member
Posts: 1887
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Re: Start menu icon not showing if usercmd button is set with <iconlib>,<index>

Post by *nsp »

@AnthonyD to what i have seen:
the -> ico extract in the .ico file all the icons present at the specified index without any conversions.
If you have 2556x256, 128x128, 96x69, 48x48, 16x16 32bit you will get exactly those icon, no less no more.
If you only have 16 or 256 color alternative you will get what you have.
It is extraction not conversion.
User avatar
petermad
Power Member
Power Member
Posts: 15813
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Start menu icon not showing if usercmd button is set with <iconlib>,<index>

Post by *petermad »

This is actually intentional: Icons in the start menu are only shown if they are either
1. in an .ico file, or
2. in the wcmicons.dll (then it will be loaded from the currently chosen substitute if using an icon library)
There is a 3rd possibility:
3. in the main Total Commander executable, must be set to %COMMANDER_EXE% or the program name without path
License #524 (1994)
Danish Total Commander Translator
TC 11.50rc3 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1385a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 49881
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Start menu icon not showing if usercmd button is set with <iconlib>,<index>

Post by *ghisler(Author) »

I will add shell32.dll as a 4th possibility, because shell32.dll is already loaded (to use its functions), so loading icons from it will also be fast. shell32.dll seems to be the only system dll used by Total Commander containing a significant amount of icons.
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 15813
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Start menu icon not showing if usercmd button is set with <iconlib>,<index>

Post by *petermad »

Whar about imageres.dll ?
License #524 (1994)
Danish Total Commander Translator
TC 11.50rc3 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1385a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 49881
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Start menu icon not showing if usercmd button is set with <iconlib>,<index>

Post by *ghisler(Author) »

imageres.dll isn't actively used by Total Commander, and it doesn't seem to be loaded by default when launching Total Commander with a fresh wincmd.ini. But it might be useful to support anyway because it contains a lot of icons...
Author of Total Commander
https://www.ghisler.com
Post Reply