MFC Workshop:: Intro To The Document/View Architecture
The document describes the MFC document/view architecture which provides an easy way to save objects and a consistent method for drawing to screens and printing. It discusses the key classes - Document stores application data, View displays the document and acts as an intermediary, Frame window contains views and controls the UI, and Application manages documents and messaging. Applications can be single document (SDI) or multiple document (MDI) and AppWizard and ClassWizard help generate the classes and code.
Download as PPT, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
51 views
MFC Workshop:: Intro To The Document/View Architecture
The document describes the MFC document/view architecture which provides an easy way to save objects and a consistent method for drawing to screens and printing. It discusses the key classes - Document stores application data, View displays the document and acts as an intermediary, Frame window contains views and controls the UI, and Application manages documents and messaging. Applications can be single document (SDI) or multiple document (MDI) and AppWizard and ClassWizard help generate the classes and code.
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 9
MFC Workshop:
Intro to the Document/View
Architecture What is Doc/View? • The central concept to MFC • Provides an easy method for saving or archiving objects • Takes the pain out of printing - uses the same code that’s used to draw to the screen • A possible downfall for apps that want MFC, but not Doc/View Application Framework The Document • Derived from CDocument • Controls application data – provides a generic interface that encapsulates data • Loads and stores data through serialization (saving objects to disk) The View • Attached to the document • Acts as an intermediary between the document and the user • Derived from CView • Document/View Relationship is One-to- Many. – Data can be represented multiple ways The Main Frame Window • The main, outermost window of the application • Contains the views in its client area • Displays and controls the title bar, menu bar, system menu, borders, maximize and minimize buttons, status bar, and tool bars The Application Object • We have already discussed CWinApp – Calls WinMain, contains main thread, initializes and cleans up application, and dispatches commands to other objects • In Doc/View it manages the list of documents, and sends messages to the frame window and views SDI or MDI? • SDI - Single Document Interface – Notepad
• MDI - Multiple Document Interface
– Word, Excel, etc. AppWizard and ClassWizard • AppWizard is like the Wizards in Word – Gives a starting point for an application • Derives the four classes for you – SDI, MDI (even dialog, or non-Doc/View) • ClassWizard helps you expand your AppWizard generate application – ex. Automatically generates message maps
Microsoft OneDrive For Beginners: The Complete Step-By-Step User Guide To Mastering Microsoft OneDrive For File Storage, Sharing & Syncing, Data Archival And File Management (Computer/Tech)
Microsoft OneDrive For Beginners: The Complete Step-By-Step User Guide To Mastering Microsoft OneDrive For File Storage, Sharing & Syncing, Data Archival And File Management (Computer/Tech)