Results 1 to 9 of 9

Thread: window handles

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jul 1999
    Posts
    1,800

    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

  2. #2
    Addicted Member
    Join Date
    Aug 2001
    Location
    I'm mobile
    Posts
    166
    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
    [p r a e t o r i a n]

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Jul 1999
    Posts
    1,800
    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

  4. #4
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    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(hParentNULL"_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.

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Jul 1999
    Posts
    1,800
    ah cool! Thanks!

  6. #6

    Thread Starter
    Frenzied Member
    Join Date
    Jul 1999
    Posts
    1,800
    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?


  7. #7
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    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.

  8. #8
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    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.

  9. #9

    Thread Starter
    Frenzied Member
    Join Date
    Jul 1999
    Posts
    1,800
    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
  •  



Click Here to Expand Forum to Full Width