Information générale
Catégorie:
Gestionnaire d'écran & Écrans
>Hi George,
>
>>I'm having some difficulty to get these functions to work. Do I need to download Focus.DLL or is there something additionally I need to do to get this to work. Please see my post yesterday post about difficulties with the _edOpenFile API.
>
>No, these functions are part of FoxTools.FLL. All you have to do is to load the library with
>
>SET LIBRARY TO (HOME()+"FoxTools.FLL") ADDITIVE
>
>Then you can use the _ED functions just like VFP functions. Here's an example. Paste the code into a PRG file and then set up an ON KEY LABEL that executes this program. When you press this hotkey, the current text line in any edit window is displayed.
>
>* Load library
>Set Library to (Home()+"FoxTools.Fll") Additive
>
>* get current window
>wHandle = _WOnTop()
>If m.wHandle == 0
> Return
>Endif
>
>* get current line
>lnPos = _EdGetPos( m.wHandle )
>lnLine = _EdGetLNum( m.wHandle, m.lnPos )
>lnStart = _EdGetLPos( m.wHandle, m.lnLine )
>lnEnde = _EdGetLPos( m.wHandle, m.lnLine+1 ) - 1
>lcLine = _EdGetStr( m.wHandle, m.lnStart, m.lnEnde )
>lcLine = ChrTran( m.lcLine, Chr(10)+Chr(13), "" )
>
>? lcLine
>Christof
I tried that and either GPF or if I set step on I'm getting a window handle but all the positions are returning 0.
Dan
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement