TC copies message box text instead of lister text

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

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

TC copies message box text instead of lister text

Post by *MVV »

Open lister, then open MRT and choose 'manually edit names'. When TC will open editor, switch to lister and try to copy some text. Then paste text into editor - text will contain message 'Click OK when you have closed the editor to load the changed names!' instead of selected text in lister.
User avatar
ts4242
Power Member
Power Member
Posts: 2081
Joined: 2004-02-02, 20:08 UTC
Contact:

Post by *ts4242 »

Confirmed for Ctrl+C
Not confirmed for Ctrl+Ins
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

This is a "feature" of Windows, not TC. Ctrl+C will always copy the text of a message box if one is open in the current process.
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

I thought that this shortcut is processed by window procedure of message box. So I don't understand why it receives this keypress when lister window is active. :)
Maybe it is another VCL bug or limitation?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

No, it's because the MessageBox() function takes over the message loop handling (GetMessage/TranslateMessage/DispatchMessage), and the Ctrl+C handling seems to be done within that message loop.
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

That's strange because GetMessage should return only messages that were sent to specified window but message box and lister have different windows...
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Yes, but since they are the same process, they share the same message loop. If you want to avoid that, you need to start Lister as a stanalone tool via /S=L command line switch.
Author of Total Commander
https://www.ghisler.com
Post Reply