Archived

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

Win32 Dialog Boxes

This topic is 5517 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 created a dialog box in visual studio and it has various edit boxes that allow the user to enter in text in the dialog box. My question is, how do I get the value of what they type in? I know about getting the radio button values and such, but what about edit boxes? Thanks.

Share this post


Link to post
Share on other sites
depends. if you''re using MFC, I think of a bunch of ways, but by far the easiest is to use DDX.

go to the class wizard and assign a member variable for you editbox. make sure it''s a value variable.

then just call UpdateData() when you want to get whatever''s written in the text box, and as if by magic the value will appear in your variable. nifty, eh?

if you''re not using MFC GetWindowText will do.


BTW I''m not trying to be mean, but that''s really a pretty basic question. You should get a decent book on win32 sdk or mfc.

Share this post


Link to post
Share on other sites
depends. if you''re using MFC, I think of a bunch of ways, but by far the easiest is to use DDX.

go to the class wizard and assign a member variable for you editbox. make sure it''s a value variable.

then just call UpdateData() when you want to get whatever''s written in the text box, and as if by magic the value will appear in your variable. nifty, eh?

if you''re not using MFC GetWindowText will do.


BTW I''m not trying to be mean, but that''s really a pretty basic question. You should get a decent book on win32 sdk or mfc.

"That''s not a bug, it''s a feature!"
--me

Share this post


Link to post
Share on other sites