stephaneeybert
asked on
Reload a document to a previously saved state.
I created a small program. It works fine, but when I reload an already loaded and modified document that has been previously saved, I don't get a warning saying that I'm about to loose the modifications of my document nor do I get the reloaded document. The loading does not occur.
But things work fine if I load another document.
But things work fine if I load another document.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
May I ask what is the behavior? Have you placed a breakpoint in OnOpenDocument() does it get called?
ASKER
I did not override OnOpenDocument.
The behavior of my program is that when I try to reload an already loaded and even modified document, the document is not reloaded. Therefore I did not think overriding OnOpenDocument was the answer to the problem. But then again, I might be wrong.
I propose you to email me directly if you wish to, at stephane_eybert@prqa.co.uk
The behavior of my program is that when I try to reload an already loaded and even modified document, the document is not reloaded. Therefore I did not think overriding OnOpenDocument was the answer to the problem. But then again, I might be wrong.
I propose you to email me directly if you wish to, at stephane_eybert@prqa.co.uk
ASKER
I did not override OnOpenDocument.
The behavior of my program is that when I try to reload an already loaded and even modified document, the document is not reloaded. Therefore I did not think overriding OnOpenDocument was the answer to the problem. But then again, I might be wrong.
I propose you to email me directly if you wish to, at stephane_eybert@prqa.co.uk
The behavior of my program is that when I try to reload an already loaded and even modified document, the document is not reloaded. Therefore I did not think overriding OnOpenDocument was the answer to the problem. But then again, I might be wrong.
I propose you to email me directly if you wish to, at stephane_eybert@prqa.co.uk
ASKER
Dear Plaroche, I read in the book Inside Visual C++ that MFC does not handle the functionality I am asking for. I don't know why such a basic capability is not taken care of by MFC. A solution to this well known problem (cf D. Kruklingski Inside Visual C++) should exist somewhere.
ASKER
Thanks for your answer anyway.