?
Solved

saving and opening

Posted on 1998-06-05
5
Medium Priority
?
482 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 100 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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

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. …
Ready to get certified? Check out some courses that help you prepare for third-party exams.
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.
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Suggested Courses

765 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