TCMenu: Menu starts sometimes somewhere.

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

Moderators: white, Hacker, petermad, Stefan2

VadiMGP
Power Member
Power Member
Posts: 672
Joined: 2003-04-05, 12:11 UTC
Location: Israel

Post by *VadiMGP »

2JohnFredC
TCMenu uses the string values to the right of the "?" as the PROMPT string for an empty parameter dialog
No, prompt is additional string connected to "?" sign without(!) spaces.
In your editor.bar file Notepad definition looks like:
cmd1=NOTEPAD.EXE
param1=%A

You can put "?" (separated by spaces!) in the param1 before or after "%A"

param1=%A ?
param1=? %A

In addition you can set prompt string:
param1=?"Enter filename" %A
User avatar
djk
Power Member
Power Member
Posts: 1651
Joined: 2003-03-17, 11:33 UTC
Location: Poland
Contact:

Post by *djk »

My problem
djk wrote:Can you really put %Commender_path% as a part of path to the .bar file? Like this: "%commander_path%\new.bar -$" ? I haven't been able to do it :-(
can be really easily solved by moving the parameter to command line as suggested Lefteous here.
DJK
Totally addicted to Total Commander
totalcmd.pl
en.totalcmd.pl
User avatar
JohnFredC
Power Member
Power Member
Posts: 886
Joined: 2003-03-14, 13:37 UTC
Location: Sarasota Florida

Post by *JohnFredC »

2 VadiMGP

I finally understood what you were getting at (which simply was: put the "?" in the bar file!, not the button parameter string).

Now TCMenu works the way I wanted. Thanks!

(And thanks for your patience!)
Licensed, Mouse-Centric, moving (slowly) toward Touch-centric
VadiMGP
Power Member
Power Member
Posts: 672
Joined: 2003-04-05, 12:11 UTC
Location: Israel

Post by *VadiMGP »

Now TCMenu works the way I wanted. Thanks!
Nice to hear!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

2VadiMGP
About the menu location: Could you call GetCursorPos() as the very first function in your plugin, before loading all the icons? This way the menu will appear where it is expected, and not moved down when the mouse was moved after clicking the button. Thanks!
Author of Total Commander
https://www.ghisler.com
VadiMGP
Power Member
Power Member
Posts: 672
Joined: 2003-04-05, 12:11 UTC
Location: Israel

Post by *VadiMGP »

2ghisler(Author)
TCmenu (and TCtoolbar too) written in MFC. Currently GetCursorPos() called in the first line of InitInstance(). Obviously, it done before reading bar file. Even if i'll move GetCursorPos() into global application constructor the time difference will be several msec only.
BTW i spend lot of time on this problem in TCToolbar and only solution i found (bad solution from my point of view) is enumerate child windows of TC to find "TButtonBar" and attach my button bar below. This solution allows at least avoid vertical mouse movement.
If you have another suggestion i'll be glad to hear.
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, MFC makes it necessary to load a few dlls (when using dll link mode) or big internal code, so this causes a delay. I also don't have any better idea, sorry.
Author of Total Commander
https://www.ghisler.com
Post Reply