Solved

How to get the text in client area of another Program

Posted on 2000-04-06
1
200 Views
Last Modified: 2010-04-10
GetWindowText cano only obtain the title of the window, not those in the client area.
0
Comment
Question by:YeNing
1 Comment
 
LVL 31

Accepted Solution

by:
Zoppo earned 20 total points
ID: 2689633
Hi YeNing,

>GetWindowText cano only obtain the title of the window, not those in the client area.

Not 100% correct ... i.e. GetWindowText can retrieve the text entered in a edit box.

BTW, there's no general answer (even if you would offer more points) coz this depends on the type of the window and in which way the text in the window handled. I.e. if one writes a simple windows application which just writes some text to a window using ::TextOut() or ::DrawText() or similar there will be no chance for you to retrieve this text (except taking a snapshot and use some exhaustive pattern matching/OCR functionality/software).

There's no general way to retrieve the text of a window's client area unless the window itself provides functionality to do this via WM_GETTEXT message (as i.e. edit box control does).

BTW, perhaps it maybe the application of the window you need to get the text from has implemented an automation interface to get the text, but this also isn't the default.

hope that helps,

ZOPPO
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

778 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question