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 :(
Printable View
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 :(
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
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
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..
ah cool! Thanks! :cool: :cool:
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?
:confused:
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?
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 ;)
Thanks! :cool: