I've gotan edit control set and created in read_only mode...
I use it to do an on-screen display of IP addresses that have connected.
Now if I do a Control Get Text to sTmp and append new data to sTmp and control set text BACK all is well.
I searched but could not find what I was looking for, either there was a SendMessage api that could append text or I need to GET the text and append it.
However, this is inside of a thread, not a callback - so Control Get Text is out.
This is not working...Buff isreturned Zero but GETTEXTLENGTH returns 62 bytes on first run (and it is 62 bytes) - so it sees it, what am I missing here?
I've tried it using a STRINg as well and a StrPtr - no go.
I use it to do an on-screen display of IP addresses that have connected.
Now if I do a Control Get Text to sTmp and append new data to sTmp and control set text BACK all is well.
I searched but could not find what I was looking for, either there was a SendMessage api that could append text or I need to GET the text and append it.
However, this is inside of a thread, not a callback - so Control Get Text is out.
This is not working...Buff isreturned Zero but GETTEXTLENGTH returns 62 bytes on first run (and it is 62 bytes) - so it sees it, what am I missing here?
I've tried it using a STRINg as well and a StrPtr - no go.
Code:
Function AppendTextToWindow(ByVal sPacket As String) As Long Local Buff As Asciiz * 4096 Local BuffSize As Long BuffSize = SendMessage(BBSDown.txtHandle, %WM_GETTEXTLENGTH,0,0) '62 bytes on average If Not IsFalse BuffSize Then 'We have text there, grab it and add a $CrLf SendMessage BBSDown.txtHandle, %WM_GETTEXT, 0, ByVal VarPtr(Buff) Buff = Buff & $CrLf & sPacket Else Buff = sPacket End If SendMessage BBSDown.txtHandle, %WM_SETTEXT, 0, VarPtr(Buff) End Function
Comment