By default MFC application wizard creats with an skeleton with a document class and another is view class.MFC seperates data management into these two class.The document class store the data and print the data and view display the data and manages the user interaction with it.
Notepad is simple example for SDI application.
or
ALL MFC application which have user interface follow this architecture.
Any MFC application creates with two basic skeleton one is document class and another is view class.document manages the data for multiple view,and view class displays the data.
MFC document/view architecture makes it easy to support multiple view,multiple document types, splitter windows and other valuable user interface features..
For exm:-
in SDI application we have following major class:-
1. CMainFrameApp:- Frame class derived from the CFrameWnd
2. CMySDIView :- View class derived from the CView class
3. CMainDoc :- Document class derived from the CDocument
Above three major class bind with a template class called CSingleDocTemplate.
Comments
Post a Comment