Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GetCaretPos() ignores cursor keys and mouse click
Message
From
07/04/2005 12:26:36
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
07/04/2005 12:18:49
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
01002065
Message ID:
01002337
Views:
23
>Cetin,
>
>You win the UT Award for Patience! THANK YOU!!! Your code works great [scratching my head] ... now I just have to figure out why it works :)
>
>For those of you following this thread: Please ignore all my posted kludges - Cetin's code is the way to go!
>
>One last question, if I may: Your rightclick code displays the popup where the edit caret is even if I rightclick somewhere else in the editbox. Perhaps this is by design? Would it be possible to have the rightclick BOTH update the cursor (caret) position in the editbox and then invoke my context menu at the point where the right mouse button was clicked? Or, in your opinion, does this break tradition with standard Windows rightmouse behavior?
>
>Just tested my question: In VFP editing windows, rightclicking displays context menu at caret location - not at point of rightclick (matching the behavior of your code). In Word 2003, however, rightclicking updates the caret to the point of the rightmouse click and then displays content menu at that point. That's what I'm hoping to achieve.
>
>Thank you again Cetin!
>Malcolm

Malcolm,
You can get whatever effect you desire. Actually I just tested it and if you used in order I gave it popups in caret position if invoked by keyboard, else at mouse position.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform