Click to See Complete Forum and Search --> : CFormView
Nathan Strandberg
June 6th, 1999, 04:55 PM
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
hiltonc
June 6th, 1999, 09:43 PM
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.
Nathan Strandberg
June 6th, 1999, 09:47 PM
How?
hiltonc
June 6th, 1999, 09:54 PM
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.
Nathan Strandberg
June 6th, 1999, 09:56 PM
Thanks!
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.