Improve Dark Help for TC

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: white, Hacker, petermad, Stefan2

User avatar
white
Power Member
Power Member
Posts: 4623
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: Improve Dark Help for TC

Post by *white »

petermad wrote: 2023-07-26, 10:19 UTC Sorry - try: https://tcmd.madsenworld.dk/totalcmdDark6.2.chm
Tested OK 👍
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6498
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Improve Dark Help for TC

Post by *Horst.Epp »

I hope that the final TC help files (Normal and Dark mode) will also have the single click enabled
Windows 11 Home x64 Version 23H2 (OS Build 22631.3527)
TC 11.03 x64 / x86
Everything 1.5.0.1373a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.73
QAP 11.6.3.3 x64
User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Improve Dark Help for TC

Post by *petermad »

The +/- buttons in Normal mode are single click enabled, so the need is not so big here - anyway - Normal mode Help files are up to Ghisler..+
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
white
Power Member
Power Member
Posts: 4623
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: Improve Dark Help for TC

Post by *white »

petermad wrote: 2023-07-26, 10:19 UTC Sorry - try: https://tcmd.madsenworld.dk/totalcmdDark6.2.chm
I said OK, but they seem to be with a sitemap again instead of a binary index.

BTW, I think the i-button looks better than the ?-button, copy the code below in your hsc6C4.hhc file:

Code: Select all

<HTML><HEAD>
	
	<META NAME="AUTHOR" CONTENT="Copyright © 1993-2023 by Christian Ghisler">
	<META NAME="GENERATOR" CONTENT="HelpScribble 7.8.0">
<!-- Sitemap 1.0 -->
</HEAD>
<BODY BGCOLOR="#202020" TEXT="#DCDCDC" LINK="#00AA00" VLINK="#CC0066" ALINK="#00CC00">
<OBJECT type="text/site properties">
	<param name="Background" value="0x202020">
	<param name="Foreground" value="0xDCDCDC">
	<param name="Window Styles" value="0x800420">
</OBJECT>
<UL>
	<LI><OBJECT TYPE="text/sitemap">
		<PARAM NAME="Name" VALUE="Help Index">
		<PARAM NAME="Local" VALUE="main_index.htm">
		<PARAM NAME="ImageNumber" VALUE="17">
	</OBJECT>
	<LI><OBJECT TYPE="text/sitemap">
		<PARAM NAME="Name" VALUE="Introduction">
	</OBJECT>
	<UL>
		<LI><OBJECT TYPE="text/sitemap">
			<PARAM NAME="Name" VALUE="What is Total Commander?">
			<PARAM NAME="Local" VALUE="whatistotalcmd.htm">
			<PARAM NAME="ImageNumber" VALUE="17">
		</OBJECT>
		<LI><OBJECT TYPE="text/sitemap">
			<PARAM NAME="Name" VALUE="What's new in this version?">
			<PARAM NAME="Local" VALUE="whats_new.htm">
			<PARAM NAME="ImageNumber" VALUE="17">
		</OBJECT>
	</UL>
	<LI><OBJECT TYPE="text/sitemap">
		<PARAM NAME="Name" VALUE="General Information">
	</OBJECT>
	<UL>
		<LI><OBJECT TYPE="text/sitemap">
			<PARAM NAME="Name" VALUE="How to register">
			<PARAM NAME="Local" VALUE="registration.htm">
			<PARAM NAME="ImageNumber" VALUE="17">
		</OBJECT>
		<LI><OBJECT TYPE="text/sitemap">
			<PARAM NAME="Name" VALUE="Updates&amp;Support">
			<PARAM NAME="Local" VALUE="updatessupport.htm">
			<PARAM NAME="ImageNumber" VALUE="17">
		</OBJECT>
		<LI><OBJECT TYPE="text/sitemap">
			<PARAM NAME="Name" VALUE="Licence">
			<PARAM NAME="Local" VALUE="licence.htm">
			<PARAM NAME="ImageNumber" VALUE="17">
		</OBJECT>
		<LI><OBJECT TYPE="text/sitemap">
			<PARAM NAME="Name" VALUE="What is shareware">
			<PARAM NAME="Local" VALUE="asp.htm">
			<PARAM NAME="ImageNumber" VALUE="17">
		</OBJECT>
	</UL>
	<LI><OBJECT TYPE="text/sitemap">
		<PARAM NAME="Name" VALUE="Operation">
	</OBJECT>
	<UL>
		<LI><OBJECT TYPE="text/sitemap">
			<PARAM NAME="Name" VALUE="User interface">
			<PARAM NAME="Local" VALUE="cmdinterface.htm">
			<PARAM NAME="ImageNumber" VALUE="17">
		</OBJECT>
		<LI><OBJECT TYPE="text/sitemap">
			<PARAM NAME="Name" VALUE="Keyboard layout">
			<PARAM NAME="Local" VALUE="keyboard.htm">
			<PARAM NAME="ImageNumber" VALUE="17">
		</OBJECT>
		<LI><OBJECT TYPE="text/sitemap">
			<PARAM NAME="Name" VALUE="Menus">
		</OBJECT>
		<UL>
			<LI><OBJECT TYPE="text/sitemap">
				<PARAM NAME="Name" VALUE="Menu Files">
				<PARAM NAME="Local" VALUE="menu_files.htm">
				<PARAM NAME="ImageNumber" VALUE="17">
			</OBJECT>
			<LI><OBJECT TYPE="text/sitemap">
				<PARAM NAME="Name" VALUE="Menu Mark">
				<PARAM NAME="Local" VALUE="menu_mark.htm">
				<PARAM NAME="ImageNumber" VALUE="17">
			</OBJECT>
			<LI><OBJECT TYPE="text/sitemap">
				<PARAM NAME="Name" VALUE="Menu Commands">
				<PARAM NAME="Local" VALUE="menu_fileactions.htm">
				<PARAM NAME="ImageNumber" VALUE="17">
			</OBJECT>
			<LI><OBJECT TYPE="text/sitemap">
				<PARAM NAME="Name" VALUE="Menu Net">
				<PARAM NAME="Local" VALUE="menu_net.htm">
				<PARAM NAME="ImageNumber" VALUE="17">
			</OBJECT>
			<LI><OBJECT TYPE="text/sitemap">
				<PARAM NAME="Name" VALUE="Menu Show">
				<PARAM NAME="Local" VALUE="menu_show.htm">
				<PARAM NAME="ImageNumber" VALUE="17">
			</OBJECT>
			<LI><OBJECT TYPE="text/sitemap">
				<PARAM NAME="Name" VALUE="Menu Configuration">
				<PARAM NAME="Local" VALUE="menu_configuration.htm">
				<PARAM NAME="ImageNumber" VALUE="17">
			</OBJECT>
			<LI><OBJECT TYPE="text/sitemap">
				<PARAM NAME="Name" VALUE="Menu Start">
				<PARAM NAME="Local" VALUE="menu_starter.htm">
				<PARAM NAME="ImageNumber" VALUE="17">
			</OBJECT>
		</UL>
		<LI><OBJECT TYPE="text/sitemap">
			<PARAM NAME="Name" VALUE="File operations">
			<PARAM NAME="Local" VALUE="menu_fileoperations.htm">
		</OBJECT>
		<LI><OBJECT TYPE="text/sitemap">
			<PARAM NAME="Name" VALUE="Pack files">
			<PARAM NAME="Local" VALUE="packedfiles.htm">
			<PARAM NAME="ImageNumber" VALUE="17">
		</OBJECT>
		<LI><OBJECT TYPE="text/sitemap">
			<PARAM NAME="Name" VALUE="Local menus">
			<PARAM NAME="Local" VALUE="local_menus.htm">
			<PARAM NAME="ImageNumber" VALUE="17">
		</OBJECT>
		<LI><OBJECT TYPE="text/sitemap">
			<PARAM NAME="Name" VALUE="Drag &amp; Drop">
			<PARAM NAME="Local" VALUE="drag_drop.htm">
			<PARAM NAME="ImageNumber" VALUE="17">
		</OBJECT>
		<LI><OBJECT TYPE="text/sitemap">
			<PARAM NAME="Name" VALUE="FTP">
			<PARAM NAME="Local" VALUE="ftp_menu.htm">
			<PARAM NAME="ImageNumber" VALUE="17">
		</OBJECT>
		<LI><OBJECT TYPE="text/sitemap">
			<PARAM NAME="Name" VALUE="Direct cable connection through USB port">
			<PARAM NAME="Local" VALUE="usb_cable_connection.htm">
			<PARAM NAME="ImageNumber" VALUE="17">
		</OBJECT>
		<LI><OBJECT TYPE="text/sitemap">
			<PARAM NAME="Name" VALUE="Direct cable connection through parallel port">
			<PARAM NAME="Local" VALUE="direct_cable_connection.htm">
			<PARAM NAME="ImageNumber" VALUE="17">
		</OBJECT>
		<LI><OBJECT TYPE="text/sitemap">
			<PARAM NAME="Name" VALUE="The internal file lister (F3)">
			<PARAM NAME="Local" VALUE="listercontents.htm">
			<PARAM NAME="ImageNumber" VALUE="17">
		</OBJECT>
		<LI><OBJECT TYPE="text/sitemap">
			<PARAM NAME="Name" VALUE="Multi-rename tool">
			<PARAM NAME="Local" VALUE="multi_rename_tool.htm">
			<PARAM NAME="ImageNumber" VALUE="17">
		</OBJECT>
		<LI><OBJECT TYPE="text/sitemap">
			<PARAM NAME="Name" VALUE="Frequently asked questions">
			<PARAM NAME="Local" VALUE="frequentlyaskedquestions.htm">
			<PARAM NAME="ImageNumber" VALUE="17">
		</OBJECT>
		<LI><OBJECT TYPE="text/sitemap">
			<PARAM NAME="Name" VALUE="Plugins">
			<PARAM NAME="Local" VALUE="plugins.htm">
			<PARAM NAME="ImageNumber" VALUE="17">
		</OBJECT>
		<LI><OBJECT TYPE="text/sitemap">
			<PARAM NAME="Name" VALUE="Folder tabs">
			<PARAM NAME="Local" VALUE="foldertabs.htm">
			<PARAM NAME="ImageNumber" VALUE="17">
		</OBJECT>
		<LI><OBJECT TYPE="text/sitemap">
			<PARAM NAME="Name" VALUE="Regular expressions">
			<PARAM NAME="Local" VALUE="reg_ex.htm">
			<PARAM NAME="ImageNumber" VALUE="17">
		</OBJECT>
	</UL>
	<LI><OBJECT TYPE="text/sitemap">
		<PARAM NAME="Name" VALUE="Configuration and Switches">
	</OBJECT>
	<UL>
		<LI><OBJECT TYPE="text/sitemap">
			<PARAM NAME="Name" VALUE="Command line parameters">
			<PARAM NAME="Local" VALUE="commandlineparameters.htm">
			<PARAM NAME="ImageNumber" VALUE="17">
		</OBJECT>
		<LI><OBJECT TYPE="text/sitemap">
			<PARAM NAME="Name" VALUE="Ini file Settings">
			<PARAM NAME="Local" VALUE="inisettings.htm">
			<PARAM NAME="ImageNumber" VALUE="17">
		</OBJECT>
		<LI><OBJECT TYPE="text/sitemap">
			<PARAM NAME="Name" VALUE="wcx_ftp INI settings">
			<PARAM NAME="Local" VALUE="wcx_ftp_ini_settings.htm">
			<PARAM NAME="ImageNumber" VALUE="17">
		</OBJECT>
		<LI><OBJECT TYPE="text/sitemap">
			<PARAM NAME="Name" VALUE="Main menu file layout">
			<PARAM NAME="Local" VALUE="dlg_mainmenu.htm">
			<PARAM NAME="ImageNumber" VALUE="17">
		</OBJECT>
	</UL>
	<LI><OBJECT TYPE="text/sitemap">
		<PARAM NAME="Name" VALUE="Credits">
	</OBJECT>
	<UL>
		<LI><OBJECT TYPE="text/sitemap">
			<PARAM NAME="Name" VALUE="Credits">
			<PARAM NAME="Local" VALUE="credits.htm">
			<PARAM NAME="ImageNumber" VALUE="17">
		</OBJECT>
		<LI><OBJECT TYPE="text/sitemap">
			<PARAM NAME="Name" VALUE="What is Info-ZIP?">
			<PARAM NAME="Local" VALUE="unzipsource.htm">
			<PARAM NAME="ImageNumber" VALUE="17">
		</OBJECT>
	</UL>
</UL>
</BODY></HTML>


Don't bother trying custom icons. They need to be in en external file at a fixed location. I did some quick tests and it didn't look better anyway.
For people who want to play with custom icons in a chm file, here are some references and information:
User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Improve Dark Help for TC

Post by *petermad »

2white
I said OK, but they seem to be with a sitemap again instead of a binary index.
https://tcmd.madsenworld.dk/totalcmdDark6.2.chm is based on Ghislers version: https://www.totalcommander.ch/help/totalcmd_chm.zip which does not use a totacmd.chw 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
white
Power Member
Power Member
Posts: 4623
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: Improve Dark Help for TC

Post by *white »

2petermad
Yes, they both do. But you do have to access the Index tab. My mistake, sorry :)
User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Improve Dark Help for TC

Post by *petermad »

new https://tcmd.madsenworld.dk/totalcmdDark7.2.zip is based on totalcmd.chm from TC 11.00rc3
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
white
Power Member
Power Member
Posts: 4623
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: Improve Dark Help for TC

Post by *white »

2petermad
You replaced only the first icon. On purpose?
User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Improve Dark Help for TC

Post by *petermad »

You replaced only the first icon. On purpose?
That was just to see how it looks, and I don't like it better than the ? icon, and it is alot of work updating all those ImageNumber lines for each new version of TC's help.

I am still leaning towards folder icons instead of book icons anyway.
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
white
Power Member
Power Member
Posts: 4623
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: Improve Dark Help for TC

Post by *white »

petermad wrote: 2023-07-26, 19:33 UTC
You replaced only the first icon. On purpose?
That was just to see how it looks, and I don't like it better than the ? icon, and it is alot of work updating all those ImageNumber lines for each new version of TC's help.
That's why I included the hsc6C4.hhc file, so you could quickly test how it looks with i-icons instead of ?-icons. Note that the background of the ?-icon is white and that of the i-icon is not. The result looks calmer and less distracting.

Updating new help versions shouldn't be that hard. The index generally doesn't change much. It often doesn't need updating at all, and if it changes, only the differences with the previous version need to be incorporated in your dark help.
petermad wrote: 2023-07-26, 19:33 UTC I am still leaning towards folder icons instead of book icons anyway.
It doesn't look good to me, but tastes vary.
User avatar
AntonyD
Power Member
Power Member
Posts: 1249
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: Improve Dark Help for TC

Post by *AntonyD »

https://ibb.co/v3gvk7x

hmmmm, so physically it's possible to make it dark.
But looks like we must "to imagine" some JavaScript? based maybe code which can do the following:
SendMessage(treeHandle, TVM_SETTEXTCOLOR, 0, 0x00FFFFFF) and
SendMessage(treeHandle, TVM_SETBKCOLOR, 0, 0)

Of course from TC we can do it easily. But if someone will open CHM file directly by dblclking on the file - the "darkness" will fall....
#146217 personal license
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Improve Dark Help for TC

Post by *ghisler(Author) »

I have tried sending TVM_SETTEXTCOLOR and TVM_SETBKCOLOR to the content list, and it works surprisingly well.
Also the list on the Search tab uses a SysListView32 control, so we can send LVM_SETTEXTCOLOR, LVM_SETBKCOLOR and LVM_SETTEXTBKCOLOR, which also works.
However, there are two problems:
1. The list on the "Index" tab uses an unknown hh_kwd_vlist control. Sending LVM_* messages to it has no effect on the colors.
2. The controls only seem to get created when switching to their tab, so the color can only be set when this happens.
Author of Total Commander
https://www.ghisler.com
User avatar
AntonyD
Power Member
Power Member
Posts: 1249
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: Improve Dark Help for TC

Post by *AntonyD »

2ghisler(Author)
sending of SetTextColor and SetBkColor for the object of this "strange" class imho should do the trick.
We only have to get HDC context of this object.
Because it's not a control - it's a virtual list window class.
https://github.com/akinbicer/windows-nt5/blob/1f8bc9eadd471f70e0494f6dffd69da4929fc28a/src/enduser/stuff/hhctrl/vlist.cpp#L517C14-L517C14
2. The controls only seem to get created when switching to their tab, so the color can only be set when this happens.
So what about the call of some pseudofunc:

Code: Select all

void ActivateAllTabs(HWND hTabControl) {
    int numTabs = SendMessage(hTabControl, TCM_GETITEMCOUNT, 0, 0);
    for (int i = 0; i < numTabs; ++i) {
        SendMessage(hTabControl, TCM_SETCURSEL, i, 0);
        Sleep(500); // Optional: Wait for some time before switching to the next tab
    }
}
So we can catch all sub-items in a "created" phase.
#146217 personal license
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Improve Dark Help for TC

Post by *ghisler(Author) »

sending of SetTextColor and SetBkColor for the object of this "strange" class imho should do the trick.
No, doesn't work. It's probably an owner-drawn listbox. It will therefore be necessary to subclass it and handle wm_paint or wm_drawitem, but that would be difficult because we don't know what to draw.
Author of Total Commander
https://www.ghisler.com
User avatar
AntonyD
Power Member
Power Member
Posts: 1249
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: Improve Dark Help for TC

Post by *AntonyD »

2ghisler(Author)
I gave a full link to the sources of this tool!
Did you look at them at all?
https://github.com/akinbicer/windows-nt5/blob/1f8bc9eadd471f70e0494f6dffd69da4929fc28a/src/enduser/stuff/hhctrl/

There for example I see:

Code: Select all

LRESULT CVirtualListCtrl::DrawItem(HDC hDC, int iItem, RECT* prc, BOOL fSel, BOOL fFocus)
...
    BOOL bDisabled = (dwFlags & 0x1);
    if( bDisabled )
      SetTextColor(hDC,clrDisabled);
    else
      SetTextColor(hDC,clrFore);
    SetBkColor(hDC,clrBack);
...
clrFore and clrBack - these are the proper chosen colors for foreground and background of the "pseudo-list" items.

P.S.
Although it may only indicate the possibility of coloring, but the final fact of this has not been brought to an end ...
But it's worth dealing with, since we have the code on hand. Although it is not the latest, but it is unlikely that it was significantly altered later.
#146217 personal license
Post Reply