...
(& I always start with the idea that it is me who made the mistake)
...
'------ FILL GLOBAL STRING ARRAY ------------------------------
SUB FillArray
INT Lpos
INT LLen
bstring LText=""
string pText=""
For Lpos = 0 TO LCount
LLen = SendMessage richedit1, EM_LINELENGTH,Lpos, 0 ' not important
'print "LineLen;" + Str(LLen)
pText = Space (255) ' it use 255 without error
SendMessage richedit1,EM_GETLINE,Lpos,strptr(pText)
'convert to bstring & show line in edit control
LText = pText
LText = Trim(LText)
'src[Lpos]=LText
lines[Lpos]=Ltext
'print "LINE: " + lines[LPos]
LText=""
Next
'array filed
'MsgBox "GLOBAL Array filled...","OK!"
End SUB