|
-
Jan 24th, 2002, 01:52 AM
#1
Thread Starter
New Member
trap Listview text from other application.
hi,
Can any one help me to trap listview text from other application by passing window handle.
thx
PCM
-
Jan 24th, 2002, 07:35 AM
#2
What do you mean by "trap"?
-
Jan 24th, 2002, 11:30 AM
#3
Lively Member
I guess you mean get the text from that listbox, maybe this works: (not tested)
Const WM_GETTEXT = &HD
Const WM_GETTEXTLENGTH = &HE
Private Declare Function SendMessageStr Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As String) As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Function GetText(Handle As Long) As String
Dim lngLen As Long, Str As String
lngLen = SendMessage(Handle, WM_GETTEXTLENGTH, 0, 0)
Str = Space(lngLen + 1)
Call SendMessage(Handle, WM_GETTEXT, lngLen + 1, ByVal Str)
GetText = Str
End Function
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|