Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
RightClick() in RTF-Control
Message
De
20/04/2005 15:53:28
 
 
À
20/04/2005 15:12:07
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Versions des environnements
Visual FoxPro:
VFP 6 SP5
Divers
Thread ID:
01006403
Message ID:
01006704
Vues:
15
>>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
Herman
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform