Link to home
Start Free TrialLog in
Avatar of nicolet
nicolet

asked on

When FileOpen did not update with the new file

In my application, I open a file name "friday", and did some modification to the documents, and then I "CLEAR" the contents. I then try to FILE OPEN "Friday" again, however I did not get the "friday" document loaded into my applicaiton. How do I make sure that when SAVE or OPEN is called. It will definately save or recall the named file??
ASKER CERTIFIED SOLUTION
Avatar of jim_pettinato
jim_pettinato

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of nicolet
nicolet

ASKER

It is a SDI, using Doc/View, Question is such as : user has opened a file "friday" from disk into application,user has done some changes to the contents of the current opened document that is "friday", now if user want to Open the file "friday" from disk ( as it was written previously) to the application, how can I make sure that the old "friday" file will be read, in spite of the "friday" file is the currently opened file. Your suggestion of using doc->OnCloseDocument() to close the current document make sense. However I am having some MFC technical difficulty, FILE OPEN command is in CApp.cpp file not in CDoc.cpp file, How can I get the doc pointer in CApp.cpp file, and second after I have OnCloseDocument() what do I call to Open the "friday" file?

Another question is that File can be open via FILE - OPEN also via FILE - recent file list. How should I do in order to make sure current opened file will be prompted to be closed : doc->OnCloseDocument() and also read in a pre written file from disk under both FILE OPEN or FILE recent file situation?

Thank You!