Private Sub cmd_GetTest_Click()
Dim WinText As String, textLen As Long
hwnd_Garena_Window = FindWindow(vbNullString, "Garena")
EnumChildWindows hwnd_Garena_Window, AddressOf WndEnumChildProc, vbNull
textLen = SendMessage(hwnd_Garena_Window_Chat, WM_GETTEXTLENGTH, 0, 0)
If (textLen) Then
WinText = String(textLen, Chr$(0))
Call SendMessage(hwnd_Garena_Window_Chat, WM_GETTEXT, textLen, ByVal WinText)
txt_Text.Text = WinText
End If
End Sub
Private Sub cmd_GetTest_Click()
Dim WinText As String
Dim textLen As Long
Dim fff() As Byte
hwnd_Garena_Window = FindWindow(vbNullString, "Garena")
EnumChildWindows hwnd_Garena_Window, AddressOf WndEnumChildProc, vbNull
textLen = SendMessage(hwnd_Garena_Window_Chat, WM_GETTEXTLENGTH, 0, 0)
ReDim fff(textLen) As Byte
If (textLen) Then
WinText = String(textLen, Chr$(0))
'Call SendMessage(hwnd_Garena_Window_Chat, WM_GETTEXT, textLen, ByVal WinText)
SendMessage hwnd_Garena_Window_Chat, WM_GETTEXT, textLen, fff(0)
For x = 0 To textLen
txt_Text.Text = txt_Text.Text & Chr(fff(x))
Next x
End If
End Sub
Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As String) As Long
Несколько десятков тысяч.
Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Сейчас этот форум просматривают: Yandex-бот и гости: 2