Incorrect .inc when use custom icon library for toolbar.
Moderators: Hacker, petermad, Stefan2, white
Incorrect .inc when use custom icon library for toolbar.
If I use "set default icon library" set the default icon library to a custom dll(and inc) file, the button in toolbar may load incorrect .inc file.
For example, there are three dll icon library files.
wcmicons.dll old style icon.
wcmicon1.dll tc 9 new icon.
wcmicon2.dll my custom icon.
with each inc files.
Now I use "set default icon library" set the default icon library to wcmicon2.dll .
Then add a button in toolbar, set command to "cm_RereadSource", and set icon file to "wcmicons.dll".
The command "cm_RereadSource" use icon 0 in both wcmicons.dll and wcmicon1.dll , but use icon 55 in wcmicon2.dll (wcmicon2.inc).
the problem is, when I set icon file to "wcmicons.dll", tc9 use wcmicon2.dll instead of wcmicons.dll but still use wcmicons.inc, so the button icon set to the incorrect icon 0 in wcmicon2.dll.
For example, there are three dll icon library files.
wcmicons.dll old style icon.
wcmicon1.dll tc 9 new icon.
wcmicon2.dll my custom icon.
with each inc files.
Now I use "set default icon library" set the default icon library to wcmicon2.dll .
Then add a button in toolbar, set command to "cm_RereadSource", and set icon file to "wcmicons.dll".
The command "cm_RereadSource" use icon 0 in both wcmicons.dll and wcmicon1.dll , but use icon 55 in wcmicon2.dll (wcmicon2.inc).
the problem is, when I set icon file to "wcmicons.dll", tc9 use wcmicon2.dll instead of wcmicons.dll but still use wcmicons.inc, so the button icon set to the incorrect icon 0 in wcmicon2.dll.
- ghisler(Author)
- Site Admin
- Posts: 50550
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Sorry, you cannot avoid that. TC will always look for the index in the default icon dll inc file.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
2mantis4d
Just use another name than wcmicon2.dll - that name is handled speciallly in TC, because TC is shipped with a wcmicon2.dll (that's wy Ghisler answers as he does).
But, you can use any other name that starts with wcmicon - like wcmicon3.dll and wcmicon3.inc - that should work.
Notice that the dll file must have a correct and unique filinfo description inside the file to be recognized by TC.
But anyway you CAN use wcmicon2.dll together with wcmicon2.inc - see: http://ghisler.ch/board/viewtopic.php?p=321185#321185 - but I recommend not to use wcmicon2.dll as the name for your own icons - since TC handles this name a little special - for example will wcmicon2.dll always show up as alternative icon library ALSO if there is NO fileinfo description inside the dll file.
Sometimes when changing the .inc file, you have to restart TC to see the effect.
Just use another name than wcmicon2.dll - that name is handled speciallly in TC, because TC is shipped with a wcmicon2.dll (that's wy Ghisler answers as he does).
But, you can use any other name that starts with wcmicon - like wcmicon3.dll and wcmicon3.inc - that should work.
Notice that the dll file must have a correct and unique filinfo description inside the file to be recognized by TC.
But anyway you CAN use wcmicon2.dll together with wcmicon2.inc - see: http://ghisler.ch/board/viewtopic.php?p=321185#321185 - but I recommend not to use wcmicon2.dll as the name for your own icons - since TC handles this name a little special - for example will wcmicon2.dll always show up as alternative icon library ALSO if there is NO fileinfo description inside the dll file.
Sometimes when changing the .inc file, you have to restart TC to see the effect.
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Isn't that a bug?ghisler(Author) wrote:Sorry, you cannot avoid that. TC will always look for the index in the default icon dll inc file.
After set default icon library, TC look for new default icon dll, but look for old default icon inc?
So that I can't Set a default icon library with more than icons wcmicons?
because those icons are not indexed in wcmicons.inc?
Well, I tried rename it to wcmicon3.dll, or wcmicon4.dll, it still has the same problem.petermad wrote:2mantis4d
Just use another name than wcmicon2.dll - that name is handled speciallly in TC, because TC is shipped with a wcmicon2.dll (that's wy Ghisler answers as he does).
..............
Sometimes when changing the .inc file, you have to restart TC to see the effect.
And that lead to another problem, if the dll file is not wcmicons.dll or wcmicon2.dll, it will not show in "set default icon library" . the new icon dll file is downloaded from net, I don't know it missed something or what.
Well I rename it to wcmicon3.dll, rename TC9 new icon back to wcmicon2.dll, It's still has the same problem.
Here is a example.
I make 4 buttons with command "cm_RereadSource", use different icons.
button 1 use %COMMANDER_PATH%\wcmicons.dll , the oldstyle icon.
button 2 use wcmicon2.dll, the newstyle icon.
button 3 use wcmicon3.dll, my custom icon.
button 4 use wcmicons.dll, which will change when I set default icon library.
here is the image.
Image: https://s6.postimg.org/mnme1d61d/iconb1.png
Now I set default icon library to different dll file, the button 4 change it's icon .
set default icon library to wcmicons.dll, button 4 icon same as button 1.
set default icon library to wcmicon2.dll, button 4 icon same as button 2.
set default icon library to wcmicon3.dll, button 4 icon should be same as button 3, but it change to another icon, wrong icon id in wcmicon3.dll.
here is the image.
Image: https://s6.postimg.org/3wp24y0up/iconb2.png
that is what I mean.
Here is a example.
I make 4 buttons with command "cm_RereadSource", use different icons.
button 1 use %COMMANDER_PATH%\wcmicons.dll , the oldstyle icon.
button 2 use wcmicon2.dll, the newstyle icon.
button 3 use wcmicon3.dll, my custom icon.
button 4 use wcmicons.dll, which will change when I set default icon library.
here is the image.
Image: https://s6.postimg.org/mnme1d61d/iconb1.png
Now I set default icon library to different dll file, the button 4 change it's icon .
set default icon library to wcmicons.dll, button 4 icon same as button 1.
set default icon library to wcmicon2.dll, button 4 icon same as button 2.
set default icon library to wcmicon3.dll, button 4 icon should be same as button 3, but it change to another icon, wrong icon id in wcmicon3.dll.
here is the image.
Image: https://s6.postimg.org/3wp24y0up/iconb2.png
that is what I mean.
- ghisler(Author)
- Site Admin
- Posts: 50550
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
But you can choose the icon yourself from the list? The inc is only for picking an icon when you choose a command.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Then the dll. file does NOT have a fileinfo description inside.And that lead to another problem, if the dll file is not wcmicons.dll or wcmicon2.dll, it will not show in "set default icon library"
Could you give a link to the file, so we can check whether it is made correctly?
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
That is the problem, if I set default icon library to wcmicon3.dll, when I choose a command, the icon picked by inc is incorrect!ghisler(Author) wrote:But you can choose the icon yourself from the list? The inc is only for picking an icon when you choose a command.
because the inc is not the one matched the dll file!
So after I choose a command, I had to find the correct icon manually!?

You had not notice that because the wcmicons.inc is as same as wcmicon2.inc , so if you set default icon library to wcmicon2.dll, it looks like TC load the correct inc(but it's not).
here is the dll and incpetermad wrote: Then the dll. file does NOT have a fileinfo description inside.
Could you give a link to the file, so we can check whether it is made correctly?
http://ul.to/0i1ljcps
by the way, why don't use icl instead of dll?
2mantis4d
The wcmicon3.dll file did not have the required fileinfo. I have now added it (naming it "Iconset 3") - you can download it here http://madsenworld.dk/tcmd/wcmicon3a.zip
Using this set it will now turn up in: "Set default icon library".
The wcmicon3.dll file did not have the required fileinfo. I have now added it (naming it "Iconset 3") - you can download it here http://madsenworld.dk/tcmd/wcmicon3a.zip
Using this set it will now turn up in: "Set default icon library".
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar