Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
RightClick() in RTF-Control
Message
From
20/04/2005 16:06:02
 
 
To
20/04/2005 15:53:28
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Environment versions
Visual FoxPro:
VFP 6 SP5
Miscellaneous
Thread ID:
01006403
Message ID:
01006711
Views:
12
>>>Hello Everybody
>>>
>>>does anyone know how to bring the insertion cursor (caret) to where the mouse right-clicked in the RTFControl ActiveX?
>>>
>>>please tell me if i am wrong, but that is supposed to be correct GUI - right?
>>>
>>>thanks for all your help
>>
>>
>>Update:
>>I have in the MouseUp() of the Active:
>>IF BUTTON = 2
>>   * *** the right mouse button was clicked
>>ENDIF
>>but after this, the cursor stays were it was before the click, and does not get moved to where the mouse is.
>>
>>i was thinking to update .SelStart to the new position, but how do i find out where that new position is? the Mouse position doesn't realy help, since its not relflected as the number of characters in the rtf-control.
>
>
>Hi Gunnar,
>
>I don't have the VFP code for this. But I think this is not difficult. Here is the hint:
>
>- Get the mouse position ( GetCursorPos() API )
>- Convert to the client window, which is RTF control ( ScreenToClient )
>- Send EM_CHARFROMPOS message
>- Send EM_SETSEL message with the return value from EM_CHARFROMPOS
>
>HTH


Hello Herman

Thanks for your reply, i'll try it this evening, i'll let you know how it turns out.

thanks again!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform