Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Peon

Working with Dialog Boxes

This topic is 5740 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''m interested in using dialog boxes, and while I haven''t had a problem so far, I can''t seem to figure out how I would retrieve something that was typed in an edit box by a user. My first thought was to use SendMessage and send it a WM_GETTEXT message to receive the text, but that would require me to have the box be a window. I tried to Spy++ to find out what the "window" that the edit box is, but I don''t have much experience with that tool and so it didn''t help me much. Any thoughts on how I could get the text from an edit box? I''m sure I will need help with other controls later as well, so if anyone has a site or some dialog box tutorial that talks about different controls and how to handle them, that would be even better. Thanks a bunch :D Peon

Share this post


Link to post
Share on other sites
Advertisement
Every control in a dialog box is a window.
Use SendDlgItemMessage (search MSDN for more information).
For each type of control you will find a list of all available messages you can send to it.
BTW. WM_GETTEXT works well with edit boxes

Share this post


Link to post
Share on other sites
Very cool! I just tried what you said (after looking up the function in the MSDN, of course) and it worked exactly like I wanted

Thanks again --

Peon

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!