Solved

How to get the text in client area of another Program

Posted on 2000-04-06
1
218 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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…
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

695 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