Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FoxTools.Fll
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00779823
Message ID:
00779972
Vues:
17
>>>You're using this, I assume, with a code or text editting window. Is this correct?
>>
>>Yes. We are still using mostly procedural coding. What I wanted to do was create a program to tell me what function or procedure I'm in with out doing a bunch of pages ups after I did a find. So I get the prg's editor window handle then the position the cursors on. I was then going to find what line # I was on then convert that to a position, which I was hoping would be the begining of the line. Then minus -1 to get the next line then read that line to see if it contained 'FUNC' OR 'PROC' at the begining. and so on and so forth. Then reset the pos back to where the Find found the match. Pop up a messagebox with the function/procedure name.
>
>Charles,
>
>Sorry, I actually had to do some work.< bg >
>
>I don't know if this will help, but this seems to work
* Get the whandle
>lnwhandle = _WFindTitl("your.prg")
>* Get the total offset of the current cursor position
>lnline = _EdGetLNum(lnwhandle, lnpos)
>* Get the beginning byte of the line number
>lnstart = _EdGetLPos(lnwhandle, lnline)
This help?

Helps a lot. I used _EdGetChar function and keep going back one char to find CHR(13) or CHR(10) but now I don't have to do that.

Thanks
Charles

"The code knows no master." - Chuck Mautz
"Everybody is ignorant, only on different subjects." - Will Rogers
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform