I open a new document, but I need access to the previous document. I can Close and Save the previous document, but I simply can't get access to the objects in that document.
I have attached the code below
Now I have an Array in CVSTADoc which I need access to and that document is on "myDoc" position in the if condition.Code:BOOL CVSTADoc::OnOpenDocument(LPCTSTR lpszPathName) { if (!CDocument::OnOpenDocument(lpszPathName)) return FALSE; POSITION myPos = GetDocTemplate()->GetFirstDocPosition(); CDocument *myDoc = GetDocTemplate()->GetNextDoc(myPos); if (myDoc != this) { /* Need code for this */ } return TRUE; }
Any help?




Reply With Quote