Solved

saving and opening

Posted on 1998-06-05
5
464 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to create frequencies of a variable from SAS dataset? 10 133
Complete beginner needs help making a cron job 9 125
string initialization in java 11 115
canBalance challenge 34 98
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
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.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

861 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