Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get text from a label

Status
Not open for further replies.

LuckyLuke

Programmer
Joined
Mar 28, 2001
Messages
188
Location
NL
Hiya,

I try to make a programm which recuires to retrieve text from a form. I can't get my programm to get the text from the form. I tried getwindowtext, etc. but nothing works... It's just a simple lable. I know it is possible and I know you guys know how to do it, I'm not long in API yet, so please help me ;)

LuCkY
 
Hi,
What text you want to retrieve from the FORM, is it the form caption or what??
Thanks Walid Magd
Engwam@Hotmail.com
 
Hiya,

As I said in my description, its a label.

It's like this. I'm making a program which logs messages when they pop up from another program. As soon as they popup, I retrieve the hWnd and I have the label too. That's the easy part. Now I want to retrieve the message from that label. WM_GETTEXT doesn't work. Spies can't see the text eiter. I've seen another program, who did exactly what I want. I contacted him, but he didn't want to give me the code. All he could say was use settext on the label first, then use gettext on the label u just used settext to. I don't get this, neither does he, because he couldn't explain it... If anyone does, or knows a better way to solve it, please help!

Suppose the hWnd of the label I want the text from is 1234. The class is CStatic. Tell me how to get the text please.

LuCkY
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top