Solved

How to get the text in client area of another Program

Posted on 2000-04-06
1
178 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 30

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
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.

708 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now