Advertisement

Working with Dialog Boxes

Started by February 02, 2003 12:31 PM
2 comments, last by Peon 21 years, 9 months ago
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
Peon
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

Advertisement
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
Peon
Or you can try ''GetDlgItemText()''.

KaMiKaZe

This topic is closed to new replies.

Advertisement