RichEdit Lib 1.6: GetSelectedText()

Everything else that doesn't fall into one of the other PB categories.
Anden
Enthusiast
Enthusiast
Posts: 135
Joined: Mon Jul 21, 2003 7:23 am
Contact:

RichEdit Lib 1.6: GetSelectedText()

Post by Anden »

... triggers an "invalid memory access" in PB4.xx

Could you please have a look, El_Choni?
El_Choni
TailBite Expert
TailBite Expert
Posts: 1007
Joined: Fri Apr 25, 2003 6:09 pm
Location: Spain

Post by El_Choni »

That lib is deprecated since PB included EditorGadget as native. And, of course, it won't work with PB 4.
El_Choni
Anden
Enthusiast
Enthusiast
Posts: 135
Joined: Mon Jul 21, 2003 7:23 am
Contact:

Post by Anden »

Well, that's very sad to hear. Because the "pure" EditGadget is no match for your lib.

And BTW, the lib DOES definitely work for most parts in v4, too

Here's a quick substitute for GetSelectedText():

Code: Select all

Procedure.s GetSelectedTextA()
  If (SendMessage_(RichTxtID, #EM_GETSEL, @sspos.l, @sepos.l) > 0)
    ststr$ = Space(sepos-sspos)    
    SendMessage_(RichTxtID, #EM_GETSELTEXT, 0, @ststr$)
  Else
    ststr$ = ""
  EndIf
  ProcedureReturn ststr$
EndProcedure

I'm sure there is still a huge demand for your lib, so please don't drop support.
Post Reply