Showing posts with label Document/View Architecture Note. Show all posts
Showing posts with label Document/View Architecture Note. Show all posts
Thursday, January 6, 2011
How to obtain a pointer to various objects?
Monday, January 3, 2011
How we connect the Document class, View class & the Frame Window class
Document templates serve as the connection between documents, frame windows and views. Document templates class is define in the Application Class
Code explaination:
CSetPaneSizeDoc derived from CDocument.
CSetPaneSizeView derived from CView.
CMainFrame derived from CFrameWnd.
Post Script:
For this dedicated tutorial, the full derivation is, which we interest (just for fun info)
CSetPaneSizeDoc: CDocument: CCmdTarget: CObject
CSetPaneSizeView: CFormView: CScrollView: CView:CWnd: CCmdTarget: CObject
CMainFrame :CFrameWndEx:CFrameWnd: :CWnd: CCmdTarget: CObject
CSingleDocTemplate* pDocTemplate; pDocTemplate = new CSingleDocTemplate( IDR_MAINFRAME, RUNTIME_CLASS(CSetPaneSizeDoc), RUNTIME_CLASS(CMainFrame), // main SDI frame window RUNTIME_CLASS(CSetPaneSizeView)); AddDocTemplate(pDocTemplate);
Code explaination:
CSetPaneSizeDoc derived from CDocument.
CSetPaneSizeView derived from CView.
CMainFrame derived from CFrameWnd.
Post Script:
For this dedicated tutorial, the full derivation is, which we interest (just for fun info)
CSetPaneSizeDoc: CDocument: CCmdTarget: CObject
CSetPaneSizeView: CFormView: CScrollView: CView:CWnd: CCmdTarget: CObject
CMainFrame :CFrameWndEx:CFrameWnd: :CWnd: CCmdTarget: CObject
Subscribe to:
Posts (Atom)