PC Review


Reply
Thread Tools Rate Thread

Interection with other applications

 
 
=?Utf-8?B?bHR0MTk=?=
Guest
Posts: n/a
 
      1st Apr 2007
Hi everyone,

I need to get some information displayed by other software, like getting the
text of a notepad window, the displayed page in IE, and so on. How i Am
supposed to do that?
Messaging? Reflection?

Any help will be appreciated.
Thanks in advance,
ltt19
 
Reply With Quote
 
 
 
 
=?Utf-8?B?V2liYmVybGV0?=
Guest
Posts: n/a
 
      1st Apr 2007
Hi,

You can use the FindWindow API call to return a handle to a specific window.
Alternatively, you can use EnumWindows to return all top level windows that
are currently operational (and filter out the ones that you are interested
in).

Once you have a window handle you can use the SendMessage API call with the
WM_GETTEXT message to retrieve information from that window.

Alternatively, you can use the GetWindowText API call to retrieve text from
a window (as before you will first need to determine the window handle for
the window you are interested in).

All of the calls reside in user32.dll so you will have to import them first.

Hope this helps, I could write some sample code for you if you need any
further help.

regards wibberlet
Got an opinion? Join the debate :-) http://wibberlet.blogspot.com

===============================================
=

"ltt19" wrote:

> Hi everyone,
>
> I need to get some information displayed by other software, like getting the
> text of a notepad window, the displayed page in IE, and so on. How i Am
> supposed to do that?
> Messaging? Reflection?
>
> Any help will be appreciated.
> Thanks in advance,
> ltt19

 
Reply With Quote
 
 
 
 
=?Utf-8?B?bHR0MTk=?=
Guest
Posts: n/a
 
      2nd Apr 2007
Hi wibberlet

Your answer will be very useful, this is the kind of information I was
looking for.
By the way, while I was waiting for this forum replies, I've played with
Spy++ tool, and I could not grab the text I wanted. The text I'am trying to
get is displayed in a kind of TreeView, and Spy++ recognizes just the
control, but it can't identify any labels inside it. Does that means that I
can't have it? Will your code work anyway?

Thanks again.
Lucas


 
Reply With Quote
 
=?Utf-8?B?V2liYmVybGV0?=
Guest
Posts: n/a
 
      3rd Apr 2007
Hi Lucas,

This is a little harder to do since a treeview has an associated hierarchy
of nodes. I believe you can use the SendMessage API call and use
TVM_GETNEXTITEM and other related parameters.

Take a look at this article which should hopefully point you in the right
direction.

regards wibberlet
Development blog at http://wibberlet.blogspot.com

"ltt19" wrote:

> Hi wibberlet
>
> Your answer will be very useful, this is the kind of information I was
> looking for.
> By the way, while I was waiting for this forum replies, I've played with
> Spy++ tool, and I could not grab the text I wanted. The text I'am trying to
> get is displayed in a kind of TreeView, and Spy++ recognizes just the
> control, but it can't identify any labels inside it. Does that means that I
> can't have it? Will your code work anyway?
>
> Thanks again.
> Lucas
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to port windows applications to compact framework applications? miloszl@gmx.de Microsoft Dot NET Compact Framework 4 15th Jun 2005 12:18 PM
speed of VB applications versus Access VBA applications =?Utf-8?B?ZWxlb25n?= Microsoft Access Getting Started 3 19th Dec 2004 01:35 AM
Windows applications versus web applications =?Utf-8?B?QnJhZCBTaW1vbg==?= Microsoft Dot NET 3 12th Jul 2004 07:29 PM
AD migration effect on applications/applications servers dan Microsoft Windows 2000 Active Directory 1 3rd Feb 2004 04:38 PM
web applications versus. web portal applications John Davis Microsoft ASP .NET 0 21st Aug 2003 01:11 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:04 PM.