Problem with icons customizing my TC main menu

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
sidefx88
Senior Member
Senior Member
Posts: 294
Joined: 2007-04-11, 17:07 UTC
Location: Argentina

Problem with icons customizing my TC main menu

Post by *sidefx88 »

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!
I Love Total Commander!
User avatar
petermad
Power Member
Power Member
Posts: 14808
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Problem with icons customizing my TC main menu

Post by *petermad »

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.
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
User avatar
sidefx88
Senior Member
Senior Member
Posts: 294
Joined: 2007-04-11, 17:07 UTC
Location: Argentina

Re: Problem with icons customizing my TC main menu

Post by *sidefx88 »

Thanks a lot, petermad!

I will try it.
I Love Total Commander!
User avatar
petermad
Power Member
Power Member
Posts: 14808
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Problem with icons customizing my TC main menu

Post by *petermad »

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:

Code: Select all

[Buttonbar]
DefaultLib=myicons
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:

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 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
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
User avatar
sidefx88
Senior Member
Senior Member
Posts: 294
Joined: 2007-04-11, 17:07 UTC
Location: Argentina

Re: Problem with icons customizing my TC main menu

Post by *sidefx88 »

Wow... that's very tricky...

I will try it. Thanks for all your tips!
I Love Total Commander!
Post Reply