-
Basic MFC question
Hi there!
If I have a dialog-based app with edit-boxes on it. I have namned these boxes and added functions through the classwizard, but now I've got a question.
A name for a box is IDC_source, how do I get the text in the box to go into a string-variable?
thanks for your help!
-
Wouldn't the class wizard do that for you?
There's some function called DDX_Text, it reads from a editbox to a CString object...
-
I just want what the user writes in the box to get into a string.....? Is that possible?
-
If you design the dialog box in the resource editor and then doubleclick on it, the class wizard will pop up and ask you to make a class for the dialog. There you select the tab member variables and add a CString variable for each edit box. Then, when you want the data, you call a member function of your dialog class (I think something like UpdateData - I don't really know). After this, all CString objects contain the data of their associated edit boxes.
-
Ok, thanks!
I'll test that later today!