n00b3 0 Newbie Poster

Hello,

I am trying to read text from a third party's application, of which I do not have the source code.

I am using c++ and I am trying to stick to the windows API.

I am relatively new to windows programming, though I have looked through MSDN and google for a solution but alas...the forums.

I am trying to read text from a child window (which i think is a custom control) of a parent window.
I can get the handles and IDs from the child and parent windows, and I can send/post messages to these as well.

It is my understanding that controls are just special windows.
It is also my understanding that a programmer can make their own controls.
I suspect that the child window with the text that I want to monitor is a custom control.
Therefore, throughout the post I will call this the "custom control".

This custom control has a scroll bar, and about 10 lines of visible text.
When one clicks on the visible text the whole line is highlighted.
A user can also clig and drag to select multiple lines, but cannot do a click/shift+click to select multiple lines.
Typing ctrl-a does not work to select all.
When one right clicks on the screen s/he gets the option to "copy". This works to copy the selected lines of text.
Also, typing ctrl-c copies the text as well.

I tried using the GetWindowText() on the child window but it is empty.

I suspect the custom control is some type of list-view/list-box text-box control and I would like to programmatically grab text from this window/custom control.
However, being that I do not know the interface to this control, how would I go about collecting/copying this text programmatically.

My plan is to attach a hook to trigger the event (as the text in the custom control is updated), but first I need to know how to copy this text.

I tried enumerating the properties of the child window/custom control, but I wouldn't know what to do with the data pointer of the property once/if I got it.
Also, I read that enumerating the properties would only work if they (the third party programmers) had Set/registered the property in the first place.
Is there a way to get the "interface", methods and data members, of a custom control?

How could I copy the text of a custom control?

Thanks for any thoughts,