|
-
May 20th, 2002, 03:13 PM
#1
Thread Starter
Frenzied Member
window handles
spy++ says my window handle is somethinig like 00000G5C.....how do I use this? I've only used the title of the window to do thiings, but this is the handle of a child window....please help, im lost
-
May 20th, 2002, 03:58 PM
#2
Addicted Member
use findWindow to get handle of the child window and then sendmessage or something else you may want. take a look at this, it may help: http://www.vbforums.com/showthread.p...hreadid=171201
-
May 20th, 2002, 04:06 PM
#3
Thread Starter
Frenzied Member
I don't know the title (doesn't have one, its a listbox I'm looking at, actually an _Oscar_Tree spy++ says)...
I tried FindWindow("_Oscar_Tree", NULL); but nothing happened
-
May 20th, 2002, 05:42 PM
#4
Frenzied Member
FindWindow only finds TopWindows... to find a child window you should use FindWindowEx...
this should get you started:
PHP Code:
HWND hParent = FindWindow("ClassOfParent", NULL);
HWND hChild = FindWindowEx(hParent, NULL, "_Oscar_Tree", NULL);
//SendMessage to hChild (= handle of the listbox) here..
Jop - validweb.nl
Alcohol doesn't solve any problems, but then again, neither does milk.
-
May 20th, 2002, 09:22 PM
#5
Thread Starter
Frenzied Member
ah cool! Thanks!
-
May 20th, 2002, 09:44 PM
#6
Thread Starter
Frenzied Member
this may sound like an extremely lame question....but here it goes.
has anyone made an aim client in C++? I thought an AIM activity logger would be a good project to get a hang of window handles.....Im just not sure how to use an "Oscar Tree"....anyone used it before?
-
May 21st, 2002, 04:45 AM
#7
Frenzied Member
I don't know how AIM works, or how it looks like, but the OscarTree doesn't look like a standard listbox... probably some modified Tree or Listview...
Maybe try a search on Google?
Jop - validweb.nl
Alcohol doesn't solve any problems, but then again, neither does milk.
-
May 21st, 2002, 05:02 AM
#8
Frenzied Member
hmm I searched at google and didn't get any good results...
I also looked at an AIM screenshot and it indeed looks like a treeview..
so.. what you could try is send some Treeview specific messages to it, and see if it reacts, also try some listbox and listview messages if the treeview's don't work.
Anyway, if you decide not to make an AIM logger, there are tons of other ways to learn window handles..
Try to make a IE url logger for example... subclass the Internet Explorer windows and look for changes in the caption (WM_SETTEXT) and than capture the url (use FindWindowEx to get to the Edit (textbox) that contains the URL).
If you don't feel like subclassing the windows you could just do it with a timer... this will get ya a 'good hang' of window handles
Jop - validweb.nl
Alcohol doesn't solve any problems, but then again, neither does milk.
-
May 21st, 2002, 02:04 PM
#9
Thread Starter
Frenzied Member
Thanks!
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
|