Results 1 to 2 of 2

Thread: Getting handles of controls from other apps...

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2000
    Location
    wrrj
    Posts
    26

    Post

    What I want to do is get the handle of two text box controls and a button from another program. I have the handle of the form that the controls reside on, but I am stumped at how to get a handle to the controls.

    I have thought about using EnumChild windows to search for a specific type of control on the parent form... would this help? I also know the text on the button that i want the handle of. One of the text boxs is starred out and the other is just plain text.

    Any help is appreciated. Thanks in advance.

    David Richardson

  2. #2
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744
    You definetly can use EnumChildWindows to get all controls on the form. But the question would be, what if you have more then 2 controls on the form with the same class name. My suggestion would be to use Spy++ or some other similar program to get the sequence of controls on the form and then use FindWindowEx to get the handles of the controls.

    By the way, what program do you want to get the information from? Maybe knowing that, we can put up a sample code for ya.

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