Icons in Main menu for em_usercmd

Here you can propose new features, make suggestions etc.

Moderators: Stefan2, white, sheep, Hacker

Post Reply
User avatar
Mikefield
Power Member
Power Member
Posts: 623
Joined: 2006-02-26, 19:13 UTC
Location: Oberursel, Germany HE

Icons in Main menu for em_usercmd

Post by *Mikefield » 2009-05-17, 16:58 UTC

These days I made my first experiences with em_usercmd. I add some of it to the main menu.
Unfortunately it's not possible to show icons for these commands in the main menu.
If I add these commands to the button bar, the icons are shown correct.
Is it planned to show icons for em_usercmd in the main menu too?

Code: Select all

[em_usercmd609]
menu=Restart TC
cmd=ReloadTC.exe
button=D:\Util\Viewer\WinCmd\Plugins\Util\ReloadTC\ReloadTC.exe
path=%COMMANDER_PATH%\Plugins\Util\ReloadTC
mf
Bankster - Word of the Year 2009

User avatar
Sombra
Power Member
Power Member
Posts: 795
Joined: 2005-12-27, 22:23 UTC
Location: Zaragoza, Spain

Post by *Sombra » 2009-05-18, 13:00 UTC

2Mikefield

Hello,

Currently it is possible for em_xyz commands, but not in the way that we have in mind. Parameter "button=" for an extended command is ignored in main menu. Here a way for do it:
You can map icons for extended commands in the file WCMICONS.INC. The format is as follow:

Code: Select all

# Command -> Icon index for icons inside WCMICONS.DLL
I recommend to use WCICONEX.DLL and WCICONEX.INC instead WCMICONS.DLL & WCMICONS.INC. So you can avoid that files will be overwritten in a future update of TC or re-installation.

You must add your custom icons to WCICONEX.DLL (Any good icon editor is valid, although I know that Clo could recommend a very good icon editor ;) )
"Extended commands" in main menu takes the ID starting by the number 10000. Well, then the first extended command which appears in menu, have the ID 10000, the second em_xyz in main menu have the ID 10001, etc.

The content of your WCICONEX.INC should looks like:

Code: Select all

[mappings]
69=26
...
...
10000=#icon index in WCICONEX.DLL for the first extended command in main menu
10001=#icon index in...
HTH
I can read English, but... I write like Tarzan. (sorry)

User avatar
Mikefield
Power Member
Power Member
Posts: 623
Joined: 2006-02-26, 19:13 UTC
Location: Oberursel, Germany HE

Post by *Mikefield » 2009-05-18, 13:52 UTC

Hello Sombra!
Thanks for your detailed answer! I've tried it and it works! Great!
Question: Points the mapping 10000 to the 1st command in the usercmd.ini or
to the 1st em_command in the which is found in the menu file?
How can I map the TC to use the WCMICONSEX.DLL and INC?

Last question, what is the magic icon editor which Claude recommended?
ADD: Found the answer on forum search -> something with Greenfish :)

mf
Bankster - Word of the Year 2009

User avatar
petermad
Power Member
Power Member
Posts: 8407
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Post by *petermad » 2009-05-18, 17:00 UTC

How can I map the TC to use the WCMICONSEX.DLL and INC?
Simply just place the two files in the TC program directory - then they will be used at next restart of TC.
License #524 (1994)
Danish Total Commander Translator
TC 9.22a 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 (1903) 64bit, 'Everything' 1.4.1.935 (x64)
TC 3.0b5 on Android 6.0
Get: Extended Total Commander Menus | PHSM-Calendar

User avatar
Sombra
Power Member
Power Member
Posts: 795
Joined: 2005-12-27, 22:23 UTC
Location: Zaragoza, Spain

Post by *Sombra » 2009-05-18, 17:02 UTC

Hello Mikefield,

Points the mapping 10000 to the 1st command in the usercmd.ini or to the 1st em_command in the which is found in the menu file?
The ID 10000 is for the first extended command found in main menu. It don't care if the extended command is stored in usercmd.ini or in WCMD_<XXX>.ini.
<XXX> = Initials for the current language in TC. Perhaps you decide to use the usercmd.ini file for have access "always" to your custom commands (independently of the language used in TC .

How can I map the TC to use the WCMICONSEX.DLL and INC?
If you have not such files in main directory of TC, then you can copy
wcmicons.dll to > wciconex.dll
wcmicons.inc to > wciconex.inc

Last question, what is the magic icon editor which Claude recommended?
ADD: Found the answer on forum search -> something with Greenfish Smile
Yes it was :)
I can read English, but... I write like Tarzan. (sorry)

User avatar
Mikefield
Power Member
Power Member
Posts: 623
Joined: 2006-02-26, 19:13 UTC
Location: Oberursel, Germany HE

Post by *Mikefield » 2009-05-18, 17:11 UTC

Thanks for clarification to both!

mf
Bankster - Word of the Year 2009

Post Reply