Menus inaccessible in dark mode

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: sheep, Hacker, Stefan2, white

Holyhead
Junior Member
Junior Member
Posts: 11
Joined: 2006-03-03, 20:06 UTC

Menus inaccessible in dark mode

Post by *Holyhead »

When I switch on dark mode in TC9.5, the main menu does not expand any more (neither via mouse nor via keyboard) and I cannot execute any menu command. [Windows 10, 1809]
(I can expand context menus, and they appear in light mode.)

Considering my other two bug reports with crashes, I suspect that my system has a some very strange configuration causing all these problems.

User avatar
sqa_wizard
Power Member
Power Member
Posts: 3527
Joined: 2003-02-06, 11:41 UTC
Location: Germany

Re: Menus inaccessible in dark mode

Post by *sqa_wizard »

Looks like a damaged TC installation.
You may re-download TC and install it once again.
#5767 Personal license

User avatar
Usher
Power Member
Power Member
Posts: 775
Joined: 2011-03-11, 10:11 UTC

Re: Menus inaccessible in dark mode

Post by *Usher »

There may be also some problems with configuration (ini) files or with graphic card drivers…
Regards from Poland
Andrzej P. Wozniak

Holyhead
Junior Member
Junior Member
Posts: 11
Joined: 2006-03-03, 20:06 UTC

Re: Menus inaccessible in dark mode

Post by *Holyhead »

I did downloaded TC 9.5 once again, installed it again and I tried it with a fresh wincmd.ini (/i option):
The menu is inaccessible in the dark mode of TC 9.5 64 bit. TC 9.5 32 bit version works fine.

BTW: my graphics card driver is up-to-date.

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 39109
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Menus inaccessible in dark mode

Post by *ghisler(Author) »

It sounds more like a broken Windows 10 to me. Try following the repair procedure in my other reply:
viewtopic.php?f=32&t=57605&p=369869#p369869
Author of Total Commander
http://www.ghisler.com

User avatar
Usher
Power Member
Power Member
Posts: 775
Joined: 2011-03-11, 10:11 UTC

Re: Menus inaccessible in dark mode

Post by *Usher »

Holyhead wrote:
2020-02-12, 07:57 UTC
BTW: my graphics card driver is up-to-date.
Some drivers certificated by MS are buggy, yet Windows 10 reinstall them on every Windows Update. Some newest drivers may be also buggy or designated for newest hardware only.
There may be also other bugs caused by Windows Update or some 3rd party internet security suite, for example missing or broken entries in Windows registry.
It's really hard to guess…
Regards from Poland
Andrzej P. Wozniak

Holyhead
Junior Member
Junior Member
Posts: 11
Joined: 2006-03-03, 20:06 UTC

Re: Menus inaccessible in dark mode

Post by *Holyhead »

I agree, it's hard to track down "from the outside".

Using Spy++, I can see that in dark mode there's a WM_UNINITMENUPOPUP message immediately after WM_INITMENUPOPUP when clicking on the menu. In light mode WM_INITMENUPOPUP is followed by typical drawing messages like WM_MEASUREITEM, WM_DRAWITEM, etc

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 39109
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Menus inaccessible in dark mode

Post by *ghisler(Author) »

You could try to switch to emulated dark mode:
wincmd.ini under section [Configuration] please add:
ForceDarkModeOptions=1

You can edit the wincmd.ini via Configuration - Change settings files directly.
Author of Total Commander
http://www.ghisler.com

User avatar
DrShark
Power Member
Power Member
Posts: 1548
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262

Re: Menus inaccessible in dark mode

Post by *DrShark »

ghisler(Author) wrote:
2020-02-14, 14:34 UTC
You could try to switch to emulated dark mode:
wincmd.ini under section [Configuration] please add:
ForceDarkModeOptions=1
Actually emulated dark mode should be enabled with value 2 or 3:
HISTORY.TXT wrote:07.01.20 Added: wincmd.ini [Configuration] ForceDarkModeOptions=2: Same as 3, but use dark title bar (32/64)
07.01.20 Added: wincmd.ini [Configuration] ForceDarkModeOptions=3 disables Windows 10-specific dark mode functions and uses compatibility mode from older versions (32/64)
Android 4.3.1 no root, kernel 08.09.2016; Vista Home Premium SP2 rus 32 bit
TC #149847 Personal licence

Cuz we're all in this together, We're here to make it right

User avatar
petermad
Power Member
Power Member
Posts: 9362
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Re: Menus inaccessible in dark mode

Post by *petermad »

DrShark wrote:
2020-02-14, 14:41 UTC
Actually emulated dark mode should be enabled with value 2 or 3:
HISTORY.TXT wrote:07.01.20 Added: wincmd.ini [Configuration] ForceDarkModeOptions=2: Same as 3, but use dark title bar (32/64)
07.01.20 Added: wincmd.ini [Configuration] ForceDarkModeOptions=3 disables Windows 10-specific dark mode functions and uses compatibility mode from older versions (32/64)
That's what I would think too.
License #524 (1994)
Danish Total Commander Translator
TC 9.5b10 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 (1909) 64bit, 'Everything' 1.4.1.960 (x64)
TC 3.0b16 on Android 6.0
Get: Extended Total Commander Menus | TC Languagebar | PHSM-Calendar

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 39109
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Menus inaccessible in dark mode

Post by *ghisler(Author) »

Yes, sorry, I meant ForceDarkModeOptions=2.

If this doesn't help, please try with Total Commander 9.50 RC1, it uses a different (but more flickering) method to draw the main menu border:
32-bit: https://www.totalcommander.ch/beta/tc950x32_rc1.exe
64-bit: https://www.totalcommander.ch/beta/tc950x64_rc1.exe
combined: https://www.totalcommander.ch/beta/tc950x32_64_rc1.exe
Author of Total Commander
http://www.ghisler.com

Holyhead
Junior Member
Junior Member
Posts: 11
Joined: 2006-03-03, 20:06 UTC

Re: Menus inaccessible in dark mode

Post by *Holyhead »

ForceDarkModeOptions did not help, I tried options 1, 2 and 3 and neither one showed the menu in dark mode. (As the title bar changed, the setting was read.)

With TC 960x64 RC1 the menu is shown, but then after about 1 second I get a different crash:

Code: Select all

	uxtheme.dll!CThemeMenu::OnInit(HWND__ * hwnd, unsigned __int64 lParam, __int64 plRet, __int64 *) Line 1272	C++
 	[Inline Frame] uxtheme.dll!CThemeWnd::_PreDefWindowProc(HWND__ *) Line 7830	C++
 	uxtheme.dll!_ThemeDefWindowProc(HWND__ * hwnd, unsigned int uMsg, unsigned __int64 wParam, __int64 lParam, int bUnicode) Line 1028	C++
 	uxtheme.dll!ThemeDefWindowProcW(HWND__ * hwnd, unsigned int uMsg, unsigned __int64 wParam, __int64 lParam) Line 1109	C++
 	user32.dll!DefWindowProcW()	Unknown
 	user32.dll!MenuWndProcWorker(struct HWND__ *,unsigned int,unsigned __int64,__int64,int)	Unknown
 	user32.dll!MenuWndProcW(struct HWND__ *,unsigned int,unsigned __int64,__int64)	Unknown
 	user32.dll!UserCallWinProcCheckWow()	Unknown
 	user32.dll!CallWindowProcW()	Unknown
 	TOTALCMD64.EXE!000000000049b3dd()	Unknown
Event viewer report:
[...]
Faulting module name: uxtheme.dll, version: 10.0.17763.831, time stamp: 0x607fb06a
Exception code: 0xc0000005
Fault offset: 0x00000000000015d4
[...]
Faulting module path: C:\WINDOWS\system32\uxtheme.dll


I executed scf /scannow, and it did not report any problem.


So far I did not test 9.5RC1x32 as the released 9.50x32 version works fine on my PC (no dark mode menu nor folder tabs problem).

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 39109
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Menus inaccessible in dark mode

Post by *ghisler(Author) »

I see - apparently the subclassing of the main window menu to draw the borders dark is causing your problem. Unfortunately I have no idea why only you are affected so far - maybe some other software is also trying to subclass the same window. Anyway, I will add an option to RC2 to turn off the subclassing. This will give you main menus with a white border, though.
Author of Total Commander
http://www.ghisler.com

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 39109
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Menus inaccessible in dark mode

Post by *ghisler(Author) »

I found something: In one of the subclass calls, I was using longint instead of LPARAM to convert the pointer, which dropped the upper 32 bits. Total Commander is set to launch in the lower 4GB of the address room, but this can be overridden. Do you use some tool which does this?
Author of Total Commander
http://www.ghisler.com

Holyhead
Junior Member
Junior Member
Posts: 11
Joined: 2006-03-03, 20:06 UTC

Re: Menus inaccessible in dark mode

Post by *Holyhead »

My PC has 32 GB. I am not aware of any setting or tool enforcing the application to run above 4 GB.

Using VMMAP, I did not notice any difference in the memory layout of TC 9.22a (x64) and TC 9.50 (x64). The TOTALCMD64.exe image is at 0x400000, while the system DLLs are at higher adresses:
0x61470000: c:\windows\system32\sysfer.dll
0x7FF8ACA50000 (and larger): other Windows DLLs

The dark mode is not that important for me, I am ok with light mode or dark mode with white borders.
But the non-working folder tabs would be a severe limitation for me.

I am looking forward to testing a fixed version. Thank you for continuing to investigate my crash reports.

Post Reply