Results 1 to 6 of 6

Thread: AIM Controlling[resolved]

  1. #1

    Thread Starter
    Fanatic Member Mushroom Realm's Avatar
    Join Date
    Mar 2002
    Location
    Murrieta, California
    Posts
    650

    AIM Controlling[resolved]

    Im working on a program that does little things to an AIM window. I can do a lot to the window in general, but now i want to be able to send text to the text box. How do i gain control of the text box?
    Last edited by Mushroom Realm; Jan 28th, 2003 at 07:57 PM.

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    There are API functions to traverse the window tree. FindWindowEx might be especially interesting to you. Once you have the HWND you can use SetWindowText to set the window's text.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  3. #3

    Thread Starter
    Fanatic Member Mushroom Realm's Avatar
    Join Date
    Mar 2002
    Location
    Murrieta, California
    Posts
    650
    Does FindWindowEx work for the window or the textbox, or both?

  4. #4
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    A textbox is a window.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  5. #5

    Thread Starter
    Fanatic Member Mushroom Realm's Avatar
    Join Date
    Mar 2002
    Location
    Murrieta, California
    Posts
    650
    In that case couldn't I just use a regular FindWindow call? Either way what should I use as the caption of the textbox?

  6. #6
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    FindWindow doesn't find child windows.
    You'd do something like (in C++, I'm not familiar enough with VB):
    Code:
    HWND hParent = GetMessengerMainWindow();
    
    // This gets the first edit box (tab order) of
    // the messenger:
    HWND hChild = FindWindowEx(hParent, NULL, "EDIT", NULL);
    // This gets subsequent edit boxes:
    hChild = FindWindowEx(hParent, hChild, "EDIT", NULL);
    Note that this searches only immediate child windows of the parent. And I don't know how to identify the right edit box if there are several.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

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