pcasxd0
asked on
keeping doc open when last frame closes
When I close the last view/frame in an MDI application, the document automatically gets closed, and its destructor is called. Can I prevent this from happening?
why?
ASKER
I want to close a view and then open it again. For opening this view again, I need the doc.
keep all neccessary data in the global objects (like CWinApp or CMainFrame)
then from CDocuments reach data using
AfxgetApp() or AfxGetMainWnd() calls.
you will need to load data once when opening first document then reuse it.
then from CDocuments reach data using
AfxgetApp() or AfxGetMainWnd() calls.
you will need to load data once when opening first document then reuse it.
ASKER
That is not the solution I want. All my data is stored in the doc and I want to access the data thru the doc. Moving it to the app or mainfrm will take some effort. I know that keeping the doc open can be done..... just don't know how.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Adjusted points from 100 to 200
ASKER
Thanks. That did the trick.