Solved

How to get the text in client area of another Program

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

Suggested Solutions

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
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 clear a vector as well as how to detect empty vectors in C++.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

737 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