Re: Doc-View Architechture
> To get a pointer to an application object from document class?
CWinApp* pApp = AfxGetApp();
To get a pointer to a frame window object from document class?
POSITION pos = GetFirstViewPosition();
CView* pView = GetNextView(pos);
CFrameWnd* pFrm = pView->GetParentFrame();
> To get a pointer to an application object from frame window class ?
CWinApp* pApp = AfxGetApp();
> To get a pointer to a document template object from frame window class?
CDocTemplate* pDocTemplate = GetActiveDocument()->GetDocTemplate();
> To get a pointer to a document object from frame window class?
> GetActiveDocument()?
Yes.
> To get a pointer to a view object from frame window class? GetActiveView()?
Yes.
> To get a pointer to a document template object from CView class?
CDocTemplate* pDocTemplate = GetDocument()->GetDocTemplate();
> To get a pointer to an application object from CView class ?
CWinApp* pApp = AfxGetApp();
Dave