WM_GETTEXT missing 1 charecter
I am trying to get the text of an AIM conversation, It seems to get everything but the end is always </HTML missing the > part. What is wrong with this?
VB Code:
Private Sub Command2_Click()
Dim hWndx As Long, kLENGTH As Long
Dim temp As String, ok As Long
hWndx = 918780 '2360364
kLENGTH = SendMessage(hWndx, WM_GETTEXTLENGTH, ByVal 0&, ByVal 0&) + 1
temp = Space(kLENGTH)
ok = SendMessage(hWndx, WM_GETTEXT, ByVal kLENGTH, ByVal temp)
Text1.Text = temp
MsgBox "Length: " & kLENGTH & " But we got: " & Len(Text1.Text)
'Open "C:\TEMP.html" For Output As #1
'Print #1, temp
'Close #1
End Sub