WCMICONS.INC custom icons

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
KozakMak
Senior Member
Senior Member
Posts: 498
Joined: 2021-05-24, 12:39 UTC
Location: UA

WCMICONS.INC custom icons

Post by *KozakMak »

For example, I use in WCMICONS.INC

Code: Select all

701=55
and it works in Start menu.

What other options can I use without creating a em_command ? Trying %COMMANDER_EXE% it doesn't seem to work.
Last edited by KozakMak on 2025-05-26, 09:59 UTC, edited 1 time in total.
OS: Win10 | TC: latest x64
User avatar
petermad
Power Member
Power Member
Posts: 16096
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: WCMICONS.INC custom icons

Post by *petermad »

2KozakMak
You can create a wcmicons.dll with more icons in it than TC's currently 87 icons. Then you can map other cm_commands to these extra icons. like in this iconset: https://tcmd.madsenworld.dk/icons/tciconsflat.zip

But, you can ONLY map cm_commands to the icons in the dll file.

Since TC 11.50 icons set for em_commands will now also be used, but only for icons in wcmicons.dll or .ico files or %COMMANDER_EXE% - but NOT from other exe or dll files.
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
KozakMak
Senior Member
Senior Member
Posts: 498
Joined: 2021-05-24, 12:39 UTC
Location: UA

Re: WCMICONS.INC custom icons

Post by *KozakMak »

2petermad
so if I use for 1st icon in Start menu 701=55 it only can be taken from WCMICON(2).DLL ?
OS: Win10 | TC: latest x64
User avatar
petermad
Power Member
Power Member
Posts: 16096
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: WCMICONS.INC custom icons

Post by *petermad »

It should be taken from the currently configured icon library ("Configuration" -> "Icons" -> "Set default icon library" (button))

Notice that if the first Start menu command is a cm_commnd, then the icon for that command (if mapped) will be used, and if the first command is an em_command with a valid icon, the that icon will be used.

Also notice that if there is an .inc file with a name that corresponds the .dll file that TC is configured to use, then that .inc file takes precedence over wcmicons.inc.

I a file with the name wciconex.dll exists in TC's program directory, then that file is automatically used if TC is configured to use wcmicons.dll
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
KozakMak
Senior Member
Senior Member
Posts: 498
Joined: 2021-05-24, 12:39 UTC
Location: UA

Re: WCMICONS.INC custom icons

Post by *KozakMak »

petermad wrote: 2025-05-26, 10:13 UTC wciconex.dll
How correct would it be to edit the wciconex.dll and add my own icons?
OS: Win10 | TC: latest x64
User avatar
beb
Power Member
Power Member
Posts: 592
Joined: 2009-09-20, 08:03 UTC
Location: Odesa, Ukraine

Re: WCMICONS.INC custom icons

Post by *beb »

2KozakMak
For instance, like I do it:
  1. make a copy of the vanilla wcmicons.dll as wciconex.dll [once in a life-time*]
  2. rename wciconex.dll to wciconex.icl
  3. add your custom icons to wciconex.icl
  4. rename wciconex.icl back to wciconex.dll
  5. repeat steps 2-4 each time you need to add your custom icons there
* Note: actually, I did step 1 twice: when I began using my custom icons (the first time), and when I switched from old-style icons (wcmicons.dll) to the new-style icons (wcmicon2.dll) and recreated my wciconex.dll from scratch (the second time, in 2019).
#278521 User License
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 16
KozakMak
Senior Member
Senior Member
Posts: 498
Joined: 2021-05-24, 12:39 UTC
Location: UA

Re: WCMICONS.INC custom icons

Post by *KozakMak »

2beb
nice one!
...and icons from iconsdb.com ? what other resources are there?
OS: Win10 | TC: latest x64
User avatar
beb
Power Member
Power Member
Posts: 592
Joined: 2009-09-20, 08:03 UTC
Location: Odesa, Ukraine

Re: WCMICONS.INC custom icons

Post by *beb »

2KozakMak
No matter what the source is, my basic approach is as follows:

Step 1: Creating a master icon.
The master icon should at least include all the formats/sizes currently supported by the operating system, e.g., for Windows 10 it could be:
16x16, 24x24, 32x32, 48x48, 64x64, 96x96, 128x128, 256x256
The master icon should also include all the typical intermediate formats/sizes, e.g.:
20x20, 40x40, 80x80
E.g., in summary:
16x16, 20x20, 24x24, 32x32, 40x40, 48x48, 64x64, 80x80, 96x96, 128x128, 256x256

As soon as all sizes for the master icon are collected, I use a PowerShell script and ImageMagick tool to assemble a multiformat icon (a single one, or in bulk):

Code: Select all

magick $array $ico
Where $array is a set of .png images of all the required sizes to make the master icon in question.

Step 2: Creating an application-specific icon from a master icon.
I use a PowerShell script and ImageMagick tool to reassemble an application-specific multi-format icon from a master icon (a single one, or in bulk):
E.g., for Total Commander's wciconex.dll (16x16, 24x24, 32x32, 48x48):

Code: Select all

$format = identify $masterIcon
if ($size -match "16x16|24x24|32x32|48x48") {$array += $ico} # 20x20|40x40|64x64|80x80|128x128|256x256
magick $array $ico
For AkelPad editor (16x16, 24x24, 32x32):

Code: Select all

$format = identify $masterIcon
if ($size -match "16x16|24x24|32x32") {$array += $ico} # 20x20|40x40|48x48|64x64|80x80|128x128|256x256
magick $array $ico
Where $array is a set of .ico formats that suit the specific application requirements for the icon sizes.
`identify` and `magick` are the ImageMagick commands.

As to the sources, from time to time, I just draw my custom icons by hand, sometimes I use online sources like icons8.com.
Your link (iconsdb.com) looks interesting as well.
#278521 User License
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 16
KozakMak
Senior Member
Senior Member
Posts: 498
Joined: 2021-05-24, 12:39 UTC
Location: UA

Re: WCMICONS.INC custom icons

Post by *KozakMak »

It sounds very complicated. I just edited the .dll in https://greenfishsoftware.org/gfie.php#apage
OS: Win10 | TC: latest x64
Post Reply