Hi!
I'm customizing my TC main menu. I've added a lot of new em commands and they work successfully.
Now I want to add icons to this new menu entries, but TC shows nothing.
I was searching on the TC Wiki (this particular page is almost empty and under construction) and this forum itself to work it out, but I've found nothing that helps.
I think that my problem is on the associated .inc file to the icon library. (myicons.dll and myicons.inc)
I guess I need to understand the mappings, but I really don't get it.
Any help about the step by step to achieve this?
Thanks a lot!
Problem with icons customizing my TC main menu
Moderators: white, Hacker, petermad, Stefan2
Problem with icons customizing my TC main menu
I Love Total Commander!
Re: Problem with icons customizing my TC main menu
If you want icons for your own em_commands in the main menu, you have to edit myicons.inc accordingly.
The number of the first em_command in your .mnu file will be 10000 in the myicons.inc file, so if you want to use for example icon 88 in myicons.dll for your first em_command, you have to put:
10000=88
in your myicons.inc file.
If you use the same em_command more than one time in the .mnu file it does not count as an extra entry. If you don't want an icon for an em_command, you just omit it, but it still counts.
Every time you add or remove an em_command from the .mnu file, you have to adjust the numbers in the myicons.inc file - for example you if have these entries:
10000=88
10001=89
10002=90
10003=100
10004=101
10010=102
and you decide to remove the third (10002) em_command from your .mnu file, then you have to change the list to:
10000=88
10001=89
10002=100
10003=101
10009=102
With a lot of em_commands, it can be quite a task to maintain the myicons.inc file.
You can see it in practice in my Extended Menus (see signature), if you install the extra addons via the "Help" -> "Install Addons for Total Commander" in the Extended Menu - that will install extra wcmicon_*.dll and wcmicon_*.inc files to match the menu.
The number of the first em_command in your .mnu file will be 10000 in the myicons.inc file, so if you want to use for example icon 88 in myicons.dll for your first em_command, you have to put:
10000=88
in your myicons.inc file.
If you use the same em_command more than one time in the .mnu file it does not count as an extra entry. If you don't want an icon for an em_command, you just omit it, but it still counts.
Every time you add or remove an em_command from the .mnu file, you have to adjust the numbers in the myicons.inc file - for example you if have these entries:
10000=88
10001=89
10002=90
10003=100
10004=101
10010=102
and you decide to remove the third (10002) em_command from your .mnu file, then you have to change the list to:
10000=88
10001=89
10002=100
10003=101
10009=102
With a lot of em_commands, it can be quite a task to maintain the myicons.inc file.
You can see it in practice in my Extended Menus (see signature), if you install the extra addons via the "Help" -> "Install Addons for Total Commander" in the Extended Menu - that will install extra wcmicon_*.dll and wcmicon_*.inc files to match the menu.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: Problem with icons customizing my TC main menu
Thanks a lot, petermad!
I will try it.
I will try it.
I Love Total Commander!
Re: Problem with icons customizing my TC main menu
2sidefx88
Also I forgot to mention that the files has to be named like: wcmiconXXXXX.dll and wcmiconXXXXX.inc that is, the filename has to start with "wcmicon" otherwise the icon library is not visible when you click "Configuration" -> "Options..." -> "Icons" -> "Set default icon library..." OR when you right-click on the buttonbar and choose "Set default icon library..."
So I cannot recommend that you name your files myicons.inc and myicons.dll.
You can use the name myicons, but then you have to add it manually in your wincmd.ini file like:
notice no extension - just the file name.
I recommend maybe to use the names wcmicon_nameofyourmenu.inc and wcmicon_nameofyourmenu.dll - so you can always see which .mnu file it belongs to.
The .dll file has to have a unique file description inside - it could look like this ( .rc file ) before it is compiled ( .res file ) and added to the dll file:
I use GoRC.exe ( http://www.godevtool.com/GorcFrame.htm ) for compiling the versioninfo.
I use ResHacker.exe ( http://www.angusj.com/resourcehacker/ ) to add the compiled resource to the dll file
Also I forgot to mention that the files has to be named like: wcmiconXXXXX.dll and wcmiconXXXXX.inc that is, the filename has to start with "wcmicon" otherwise the icon library is not visible when you click "Configuration" -> "Options..." -> "Icons" -> "Set default icon library..." OR when you right-click on the buttonbar and choose "Set default icon library..."
So I cannot recommend that you name your files myicons.inc and myicons.dll.
You can use the name myicons, but then you have to add it manually in your wincmd.ini file like:
Code: Select all
[Buttonbar]
DefaultLib=myicons
I recommend maybe to use the names wcmicon_nameofyourmenu.inc and wcmicon_nameofyourmenu.dll - so you can always see which .mnu file it belongs to.
The .dll file has to have a unique file description inside - it could look like this ( .rc file ) before it is compiled ( .res file ) and added to the dll file:
Code: Select all
1 VERSIONINFO
FILEVERSION 1,0,0,0
PRODUCTVERSION 1,0,0,0
FILEOS 0x40000
FILETYPE 0x1
{
BLOCK "StringFileInfo"
{
BLOCK "040904E4"
{
VALUE "FileDescription", "Icons for Extended Menus - 64bit (by petermad)"
VALUE "FileVersion", "1.0.0.0"
}
}
BLOCK "VarFileInfo"
{
VALUE "Translation", 0x0409 0x04E4
}
}
I use ResHacker.exe ( http://www.angusj.com/resourcehacker/ ) to add the compiled resource to the dll file
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: Problem with icons customizing my TC main menu
Wow... that's very tricky...
I will try it. Thanks for all your tips!
I will try it. Thanks for all your tips!
I Love Total Commander!