|
-
Dec 13th, 2001, 02:49 PM
#1
Thread Starter
Addicted Member
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!
-
Dec 14th, 2001, 07:54 AM
#2
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...
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Dec 14th, 2001, 01:51 PM
#3
Thread Starter
Addicted Member
I just want what the user writes in the box to get into a string.....? Is that possible?
-
Dec 14th, 2001, 02:09 PM
#4
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.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Dec 15th, 2001, 03:36 AM
#5
Thread Starter
Addicted Member
Ok, thanks!
I'll test that later today!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|