Results 1 to 5 of 5

Thread: Help on getting label's name and caption in a running program

  1. #1

    Thread Starter
    Member
    Join Date
    Feb 2001
    Location
    NewYork
    Posts
    53

    Question

    One can use FindWindow and GetWindowText to get controls that have windows handles in another application. However lightweight controls, such as label, line, and image, are windowless. Now that in my program I need to look at another running program's label, pick up the value to synchronize with my program. Are there ways to lookup another application's labels control's name and caption with Windows API or any utilities?

    Thanks

  2. #2
    Addicted Member
    Join Date
    Feb 2001
    Location
    Classified
    Posts
    234
    I know it is possible, their is a program called Windows Sniper, available at http://www.unhuman.com/

    No source code, but if you only need the name of the label and code it staticaly into the code, then this is probly what i would use.
    My ICQ Status: (85634850)

    Seriously Sick Tshirts

  3. #3
    Guest
    That depends if the other App is written Vb or C++. It it's written in C++, the control is likely to have a handle because it's probably a Static control.

  4. #4

    Thread Starter
    Member
    Join Date
    Feb 2001
    Location
    NewYork
    Posts
    53
    Ph34R, Thanks for the info on Windows Sniper. I downloaed it and tried it. A very neat software. Unfortunately the crosshair icon can not be dragged on top of labels.

    Megatron, The external running program was written in VB. The labels appeared no windows handles. I have tried Enumerate windows but found none for labels.

    Any other thoughts? Thanks.

  5. #5
    Guest
    I believe the Labels are drawn via the DrawText function in VB, so I don't think there's a way to retrieve the text.

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