|
-
June 6th, 1999, 04:55 PM
#1
CFormView
I have a program that uses CFormView. On that dialog I have 6 Editboxs and 1 listbox, When you save the file and close it, then try to open it back you loose all the data you entered into the boxes. How can I save all the data that the user enters into those boxes? Any Ideas??
Thanks!
Nathan Strandberg
-
June 6th, 1999, 09:43 PM
#2
Re: CFormView
First of all, you need to perform DDX/DDV--send all the values in the editboxes and listbox to member variables. Then, modify Serialize so that those member variables are stored and loaded properly.
-
June 6th, 1999, 09:47 PM
#3
-
June 6th, 1999, 09:54 PM
#4
Re: CFormView
Open ClassWizard, open the Member variables tab, click on each control ID and click Add Variable. Fill out the neccessary info. This will implement DDX/DDV. Now in your Serialize function (in the CDocument-derived class), serialize these variables. Look up how serialize works in the online documentation. Before putting the variables into or pulling them out of the CArchive object, call UpdateData(TRUE) or UpdateData(FALSE), respectively. If any of these terms are unfamiliar, look them up in the online documentation.
-
June 6th, 1999, 09:56 PM
#5
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
|