Solved

saving and opening

Posted on 1998-06-05
5
449 Views
Last Modified: 2013-11-19
I have gotten privious help on how to create file dialog box but now I can't figure out the code to actually save and open data into the dialog boxs member valiables by using the file dialog box.
0
Comment
Question by:hartman2
  • 2
  • 2
5 Comments
 
LVL 1

Expert Comment

by:chacko
ID: 1316056
The first parameter to the 'CFileDialog' is FALSE/TRUE to say whether it is Open/Save Dialog. After executing 'DoModal' you can get the file name thru the function 'GetPathName'.
0
 

Author Comment

by:hartman2
ID: 1316057
I think that you mis understood me.  The code that I have will create a file by using dialog boxes. I wanted to know how to store the data into the file that the user created.  Reminder I am creating a dialog based program.  I wanted to store numbers and  strings into the file.
0
 
LVL 1

Expert Comment

by:chacko
ID: 1316058
Use StdioFile class.
0
 

Author Comment

by:hartman2
ID: 1316059
I do not think that the CStdioFile will work. But I am in despret need to know how to write member variable to the file that the user creates.  Any and all help will be appreciated.
0
 
LVL 1

Accepted Solution

by:
guruprasad031298 earned 50 total points
ID: 1316060
Use the serialize functionality. Lookup the Serialize method & CArchive classe and also topics on serialization.

Serialization works with your document. So, if you have a good document-view architecture, then serialization is the best way to go for 'Saving & Opening files'.
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now