Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Get text from a label

Get text from a label

Get text from a label


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 ;)


RE: Get text from a label


I think you can use GetDlgItemText() to retrieve the text from a label.

Good luck

RE: Get text from a label


Its great finally someone responds to this threat , but now I have a new problem, how on earth do I use this command, I tried to search for it, but I can't find anything which gives examples and so...


RE: Get text from a label

What language are you programming in?  I might be able to give you an example of how to use the above.

RE: Get text from a label


I'm programming in Visual Basic. If this is a big problem, you can give it to me in C++ aswell and I'll get the hang of it (I hope)

Sorry for this late reply, but I was away for a few days.


RE: Get text from a label

In C++ an universall method for get label text is GetWindowText what gets the caption from a window. Every controls on the forms and the forms also are windows.

John Fill


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close