|
-
April 19th, 1999, 08:41 PM
#1
Doc-View Architechture
I have an application (MDI) built over the document-view type of architecture of MFC. I have the following problems.
how ....
To get a pointer to an application object from document class?
To get a pointer to a frame window object from document class?
2. Regarding to CMDIChldWnd
To get a pointer to an application object from frame window class ?
To get a pointer to a document template object from frame window class?
To get a pointer to a document object from frame window class?GetActiveDocument()?
To get a pointer to a view object from frame window class? GetActiveView()?
3. Regarding to CView Class
To get a pointer to a document template object from CView class?
To get a pointer to an application object from CView class ?
Since I have two types of frameworks in my Application how can i access one from the other?
Waiting for a reply,
Thanks in advance
Tapan
-
April 20th, 1999, 04:27 AM
#2
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|