|
-
Aug 6th, 2003, 03:01 PM
#1
Thread Starter
Lively Member
Extract info from other window?
Is there any way, like an API call or something with hwnd, to get information from another application like label names/captions/tags?
Like, say I click on a label in another program thats running, is there any way to put the info from that label in my program?
edit: alright, I've done some looking around, and realize that there is no hWnd for a label, but is there any way to get the info off of another program's form window?
Last edited by thetakerfan; Aug 6th, 2003 at 04:30 PM.
-
Aug 6th, 2003, 11:35 PM
#2
Frenzied Member
To get the Caption of the Form window use
GetWindowTextLength
and GetWindowText API..
To get The size use
GetWindowRect
What else u want to get about the other window?
-
Aug 7th, 2003, 03:36 PM
#3
Thread Starter
Lively Member
I actually wanted to get the caption from a label, not the form, but there might be another way to do it.
On the form, there is a listview or listbox, which I believe does have hWnd, whereas a label does not. When an item in the list is selected, it then fills the rest of the labels on the form, which is the info I want to get from the form.
Is there anyway to intercept the routine that happens when an item in the list is clicked and get the info from their as it adds it to the form?
-
Aug 7th, 2003, 03:51 PM
#4
Hyperactive Member
some labels do, some dont. depends on what the creator intended.
use GetWindowText API to get text from an hWnd. (or use SendMessage API with WM_GETTEXT param...... either works)
-
Aug 7th, 2003, 08:59 PM
#5
Thread Starter
Lively Member
I don't see any of the labels using Spy++, so I don't know if I'm just missing something or not.
Anyway to catch the stuff from the listbox?
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
|