Quick view panel: Clicking on a Lister plugin didn't mark the panel as active

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

Moderators: petermad, Stefan2, white, Hacker

Post Reply
AkulaBig
Power Member
Power Member
Posts: 728
Joined: 2021-09-09, 17:28 UTC

Re: Quick view panel: Clicking on a Lister plugin didn't mark the panel as active

Post by *AkulaBig »

ghisler(Author) wrote: 2026-04-19, 07:34 UTC
Command SendMessage(hListerHandle, WM_COMMAND, 0, 0xFFF80000); doesn't work.
plugin can't show wrong focus.
This is understandable. But after setting the focus, as I showed above, the panel is already activated. That is, there is no need to use WM_COMMAND anymore. And you won’t be able to check its operation.
Is there some TC setting that may affect panel activation? My activation in TC1by1 works. Moreover, it also works on pure TC. Doesn't Fla$her work? Hooks are not intercepted by third-party programs, so why can it be?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 52639
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Quick view panel: Clicking on a Lister plugin didn't mark the panel as active

Post by *ghisler(Author) »

I'm sorry, the information in the history.txt file is wrong. It should be:
SendMessage(hListerHandle, WM_COMMAND, 0xFFF80000, window_handle);
with window_handle the handle of the quick view window as returned to the ListLoad call. It's described correctly in the lister plugin developer guide help.

However, it's currently broken in RC4 64-bit, it only works in RC4 32-bit. Please try again with the changed call when RC5 comes out.
Author of Total Commander
https://www.ghisler.com
AkulaBig
Power Member
Power Member
Posts: 728
Joined: 2021-09-09, 17:28 UTC

Re: Quick view panel: Clicking on a Lister plugin didn't mark the panel as active

Post by *AkulaBig »

ghisler(Author) wrote: 2026-04-21, 09:16 UTC it only works in RC4 32-bit.
Difficulties in technical translation and my non-standard code do not allow us to understand each other :(
The command does not work for me in TC32 either. I don't understand where to apply it. I'm testing on TCAlReaderExt. In this plugin I can easily turn header activation on and off.
In which procedure should I insert the command PostMessage(GetParent(ListWin),WM_COMMAND,MAKELONG(value,itemtype),(LPARAM)ListWin);?
ListLoadW does not have a ListWin window. There is ParentWin. Okay, I'm writing PostMessage(GetParent(ParentWin),WM_COMMAND,0xFFF80000,(LPARAM)ParentWin);
Doesn't work. ParentWin It's clear:
[img]https://s1.hostingkartinok.com/uploads/thumbs/2026/04/a1e6d567a29225801dd3304aa95a358d.png[/img]

[img]https://s1.hostingkartinok.com/uploads/thumbs/2026/04/970975c5c50d78a7d330516b1ecc842e.png[/img]
What do you expect to see in GetParent(ParentWin)? Here's what it actually shows:
[img]https://s1.hostingkartinok.com/uploads/thumbs/2026/04/d718bafa7d54762bb202641a34d63d6b.png[/img]

[img]https://s1.hostingkartinok.com/uploads/thumbs/2026/04/dcd83ae9cbad8cca88e28546e181005e.png[/img]
This is right? Or should there be a window that I have called hListerHandle?
[img]https://s1.hostingkartinok.com/uploads/thumbs/2026/04/ce9cc9b5d7f347c9cf66a723ddc5d6d7.png[/img]

[img]https://s1.hostingkartinok.com/uploads/thumbs/2026/04/fe1c41c92e85e8d197c8264f275ba960.png[/img]
This is an application window without a title. It is the parent of the application window with the title:
[img]https://s1.hostingkartinok.com/uploads/thumbs/2026/04/b5c7ddf8f8e45e339c140c26d907aea2.png[/img]
I tried to insert this code into the mouse hook WM_LBUTTONUP (this is how I solved the focus problem, as I wrote about above) and into the window procedure for WM_SETFOCUS. The team is not working anywhere.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 52639
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Quick view panel: Clicking on a Lister plugin didn't mark the panel as active

Post by *ghisler(Author) »

In which procedure should I insert the command PostMessage(GetParent(ListWin),WM_COMMAND,MAKELONG(value,itemtype),(LPARAM)ListWin);?
ListLoadW does not have a ListWin window. There is ParentWin. Okay, I'm writing PostMessage(GetParent(ParentWin),WM_COMMAND,0xFFF80000,(LPARAM)ParentWin);
ListWin is the window your plugin returns to the caller of ListLoadW. When receiving WM_COMMAND, Lister/Quick View checks whether lParam matches the value returned from ListLoadW. The message should be sent to the window handle you received from the ListLoadW call.
Author of Total Commander
https://www.ghisler.com
AkulaBig
Power Member
Power Member
Posts: 728
Joined: 2021-09-09, 17:28 UTC

Re: Quick view panel: Clicking on a Lister plugin didn't mark the panel as active

Post by *AkulaBig »

ghisler(Author) wrote: 2026-04-21, 15:49 UTC ListWin is the window your plugin returns to the caller of ListLoadW.
Okay, we don't understand each other :) Can you at least write the class name of the ListWin window? And does this window have text in its title? And do I need to put focus on the ListWin window before sending it a command?
Is there a ListWin window in the screenshots I provided?
Understand that the expression GetParent(ListWin) has no meaning to me. For different applications this can be completely different windows. I am looking for the TLister window with the command HWND hListerHandle = GetAncestor(hAppHandle, GA_ROOT);
Personally, I believe that I can only send your command from a mouse hook when left clicking on a window. But I would like your confirmation.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 52639
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Quick view panel: Clicking on a Lister plugin didn't mark the panel as active

Post by *ghisler(Author) »

Okay, we don't understand each other :) Can you at least write the class name of the ListWin window?
ListWin is YOUR window! ListLoadW is defined as:
HWND __stdcall ListLoadW(HWND ParentWin,char* FileToLoad,int ShowFlags);
The return value (here: blue) is the window your plugin creates and returns to Lister. This is what you need to send in WM_COMMAND as the LPARAM value. It doesn't matter whether this is your main display window, TC just compares the two numbers (the one received via ListLoadW and the one received via WM_COMMAND). If the two numbers don't match or are zero, the message is ignored.
You need to send that message to ParentWin, the window you receive from ListLoadW:
SendMessage(ParentWin, WM_COMMAND, 0xFFF80000, window_handle);
Author of Total Commander
https://www.ghisler.com
AkulaBig
Power Member
Power Member
Posts: 728
Joined: 2021-09-09, 17:28 UTC

Re: Quick view panel: Clicking on a Lister plugin didn't mark the panel as active

Post by *AkulaBig »

ghisler(Author) wrote: 2026-04-22, 06:38 UTC SendMessage(ParentWin, WM_COMMAND, 0xFFF80000, window_handle);
Finally we understand each other! I substituted completely different window handles.
AkulaBig
Power Member
Power Member
Posts: 728
Joined: 2021-09-09, 17:28 UTC

Re: Quick view panel: Clicking on a Lister plugin didn't mark the panel as active

Post by *AkulaBig »

ghisler(Author) wrote: 2026-04-22, 06:38 UTC ListWin is YOUR window!
Everything became clear to me about the team and the principle of its work. But this did not solve the problem. Doesn't work. I'm pretty sure it doesn't work because I don't set the focus to the ParentWin window. But if I set focus to this window, the title will be activated even without your command :(
There is only one way out, build a test version of TC1by1 and ask Flasher to check its operation.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 52639
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Quick view panel: Clicking on a Lister plugin didn't mark the panel as active

Post by *ghisler(Author) »

You don't need to do this for TC1by1 because Total Commander already detects the focus change with it.
The WM_COMMAND message is ignored when the cursor is currently on a file list. Try sending it with the focus on the command line. Also you need Total Commander 11.57 RC5 to test this with the 64-bit version.
Author of Total Commander
https://www.ghisler.com
AkulaBig
Power Member
Power Member
Posts: 728
Joined: 2021-09-09, 17:28 UTC

Re: Quick view panel: Clicking on a Lister plugin didn't mark the panel as active

Post by *AkulaBig »

ghisler(Author) wrote: 2026-04-22, 10:27 UTC You don't need to do this for TC1by1 because Total Commander already detects the focus change with it.
Doesn't work for Fla$her:
Fla$her wrote: 2026-04-17, 21:02 UTC 2AkulaBig
It doesn't work. Could you check on XP SP3 x32 and 7 x32?
ghisler(Author) wrote: 2026-04-22, 10:27 UTC Also you need Total Commander 11.57 RC5 to test this with the 64-bit version.
But in TC RC4 x32 it should work. Right? I'm testing on x32.
ghisler(Author) wrote: 2026-04-22, 10:27 UTC The WM_COMMAND message is ignored when the cursor is currently on a file list. Try sending it with the focus on the command line.
Is this advice specifically for TC1by1? Right?
I'm testing on TCAlReaderExt. Only for Fla$her I want to build a test version of TC1by1.
AkulaBig
Power Member
Power Member
Posts: 728
Joined: 2021-09-09, 17:28 UTC

Re: Quick view panel: Clicking on a Lister plugin didn't mark the panel as active

Post by *AkulaBig »

The question about RC4 has been removed since RC5 was released. I'll test it.
AkulaBig
Power Member
Power Member
Posts: 728
Joined: 2021-09-09, 17:28 UTC

Re: Quick view panel: Clicking on a Lister plugin didn't mark the panel as active

Post by *AkulaBig »

The command doesn't work for me in RC5 either. I don't see any point in continuing further testing since all plugins now have the quick view header enabled.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 52639
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Quick view panel: Clicking on a Lister plugin didn't mark the panel as active

Post by *ghisler(Author) »

OK, then we end the discussion here. For me the command works as it should.
Author of Total Commander
https://www.ghisler.com
AkulaBig
Power Member
Power Member
Posts: 728
Joined: 2021-09-09, 17:28 UTC

Re: Quick view panel: Clicking on a Lister plugin didn't mark the panel as active

Post by *AkulaBig »

ghisler(Author) wrote: 2026-04-23, 07:18 UTC OK, then we end the discussion here. For me the command works as it should.
USER+50, USER+51 work without problems for me. This one doesn't work. I think I'm sending it to the wrong window.
Do you have open source plugins where this command has already been applied? Or maybe post a piece of code you tested on? Let it be on Delphi, it doesn’t bother me.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 52639
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Quick view panel: Clicking on a Lister plugin didn't mark the panel as active

Post by *ghisler(Author) »

USER+50, USER+51 work without problems for me.
These must be sent to the main Total Commander window.
This one doesn't work.
WM_COMMAND must be sent to the Lister/QuickView window which the plugin receives with ListLoadW as described above. It has existed for a LONG time with other parameters, so the plugin can inform Lister about certain status changes. Just itm_focus is new.

From the Lister plugin development help:
WM_COMMAND

WM_COMMAND can be sent to the parent window to set a new percentage value in Lister's title bar, or to check some menu items like fonts or word wrap mode.

Usage:

PostMessage(GetParent(ListWin),WM_COMMAND,MAKELONG(value,itemtype),(LPARAM)ListWin);

Description of parameters:

ListWin Hande to your list window created with ListLoad

value
The new value, depending on what is passed in itemtype (see below).

itemtype
Item to change in the framework (Lister) window. Can be one of the following:
itm_percent Set the percent value in the menu bar of the main Lister window.
itm_fontstyle Set the font style: set value to lcp_ansi, lcp_ascii, or lcp_variable.
itm_wrap Word wrap mode on or off. Set value to 1 for on or 0 for off.
itm_fit Fit image to screen on or off. Set value to 1 for on or 0 for off.
New in 1.6: Set to 2 for lcp_fittowindow and
to 3 for lcp_fitlargeronly (if 1, the user-chosen option is not changed)
itm_center New in 1.6: Center image on screen on or off. Set value to 1 for on or 0 for off.
itm_next New in TC 5.52: Switch to next file if multiple opened (e.g. after playing an mp3). The value of "value" MUST be 0!
itm_focus New in 2.13 (TC 11.57): A plugin can send this to Total Commander to inform it that it gained the focus. Only necessary if clicking on the Quick View panel does NOT update the focus header above the file list and Quick View panel.

Return value:

No value is returned by Lister, so you may use PostMessage() or SendMessage().

Notes:

The message can also be sent during ListLoad, even though Lister doesn't yet know the window handle of the list window! It sets a special flag to handle this. Do not send this message if you don't want to modify any of the values!
Author of Total Commander
https://www.ghisler.com
Post Reply