MFC Document/View programs

Slides:



Advertisements
Similar presentations
MFC Workshop: Intro to the Document/View Architecture.
Advertisements

The Gettysburg Address Four score and seven years ago our fathers brought forth on this continent, a new nation, conceived in Liberty, and dedicated.
Introductory XHTML pages Please use speaker notes for additional information!
Visual Basic Project 1 IDS 306 Spring 1999 V. Murphy.
Introduction to Microsoft Windows MFC Programming: the Application/Window Approach Lecture 4.
Type on Slide Slides. IgneousSedimentaryMetamorphic.
Close Reading.  You should be working on your last note catcher.  Yesterday we combined our note catchers to make a packet will all 5 note catchers.
MFC Workshop: Intro to MFC. What is MFC? Microsoft Foundation Classes C++ wrappers to the Windows SDK An application framework A useful set of extensions.
INTRODUCTION TO VC++ As the Microsoft Windows 3.X and then 5.5 operating system was becoming popular, many programmers were interested in creating graphical.
Basics: Text boxes Backgrounds Shapes Fonts Transitions Animations Spell check Clip Organizer Advanced: Music Video / URL Merge Presentations Narration/voice.
HTML H yper T ext M arkup L anguage. HTML HTML is NOT case sensitive However, proper coding etiquette if for all to be in ALL CAPS and for text to be.
Links in XHTML Please use speaker notes for additional information!
C++ MFCs CS 123/CS 231. MFC: Writing Applications for Windows zClasses in MFC make up an application framework zFramework defines the skeleton of an application.
BZUPAGES.COM Visual Programming Lecture – 5 Miss. SADAF MAJEED SIAL Computer Science Department Bahauddin Zakariya University Multan.
MFC Windows Programming: Document/View Approach More detailed notes at: 360/notes-html/class15.htm.
Enhancing the Graphical User Interface Multiple Forms, Controls, and Menus.
HTML - Examples Be sure to check speaker notes for additional information!
Create a Simple MFC Application Automatically How to use the application wizard.
1 CHAPTER 7. Objectives: You’ll learn about;  Introduction  Fundamentals of binary data files  Processing binary files  Files with mixed type data.
Microsoft Foundation Classes. What is MFC? Set of C++ classes written by MS Simplifies writing complex programs Covers many areas: – GUI – I/O – O/S interfaces.
Lotus 认证培训 Notes Domino 6/6.5 Application Development Foundation Skills ( 610 ) Exam Number: 610 Competencies: Please see exam guide. Length:
WHAT IS IT AND WHY SHOULD I CARE? 1.0.  The use of computers to present text, graphics, video, animation, and sound in an integrated way.  Text: Words,
Warm Up: What do you see? What does this mean?. Agenda: 1.Gallery Walk: Battles of the Civil War 2.Review battles 3.Begin Civil War Timeline.
Chapter 8 : Binary Data Files1 Binary Data Files CHAPTER 8.
Lincoln’s Gettysburg Address Given November 19, 1863 on the battlefield near Gettysburg, Pennsylvania, U.S.A.
Database Management Supplement 1. 2 I. The Hierarchy of Data Database File (Entity, Table) Record (info for a specific entity, Row) Field (Attribute,
Overview of Previous Lesson(s) Over View 3 Program.
Microsoft Foundation Classes
12-Jun-16 Event loops. 2 Programming in prehistoric times Earliest programs were all “batch” processing There was no interaction with the user Input Output.
Part II Document/View Architecture. Chapter 9 Documents, Views, and the Single Document Interface.
Close Reading.  You should be working on your last note catcher.  Yesterday we combined our note catchers to make a packet will all 5 note catchers.
NAME____________ Four score and seven years ago our fathers brought forth, upon this continent, a new nation, conceived in Liberty, and dedicated to the.
 Basic tags are the ones which defines the  General structure of the html document  These tags are a prominent part of a webpage. They enclose all.
Working with Cascading Style Sheets
Chapter 14 Windows Programming with the Microsoft Foundation Classes
Introduction to Windows Programming
MULTIPLE DOCUMENTS AND MULTIPLE VIEWS Prosise - Chapter 11
Document/View Architecture
Multiple document interface (MDI)
Message Handling in MFC
SDI & MDI SDI -> Single Document Interface
Microsoft Foundation Classes MFC
Tutorial 5: Working with Excel Tables, PivotTables, and PivotCharts
Event loops 16-Jun-18.
Lecture 27 Creating Custom GUIs
Instructor’s Guide to Teaching SolidWorks Software Lesson 1
Cartography and Labeling
Introduction to Windows Programming with Microsoft Framework Classes (MFC) Jim Fawcett Summer 2004 Syracuse University.
Understand Windows Forms Applications and Console-based Applications
Chap 7. Building Java Graphical User Interfaces
Software engineering USER INTERFACE DESIGN.
Databases.
Basic editing Word 2016.
Statistical Fundamentals: Using Microsoft Excel for Univariate and Bivariate Analysis Alfred P. Rovai Getting Started PowerPoint Prepared by Alfred P.
warm-up: Complete on your own sheet of paper.
.NET and .NET Core 7. XAML Pan Wuming 2017.
Event loops.
Multiple Document Interface (MDI)
The Ability to Discriminate Colors Changes with Surrounding Color
Event loops 17-Jan-19.
Event loops 17-Jan-19.
Event loops 8-Apr-19.
Microsoft Office Access is the best –selling personal computer database management system. What is Access?
Model, View, Controller design pattern
SOAP.
Chapter 12 Windows Programming with the Microsoft Foundation Classes
Lesson 14 Spreadsheet Software.
Event loops.
Event loops 19-Aug-19.
Four score and seven years ago our fathers brought forth on this continent, a new nation, conceived in liberty and dedicated to the proposition that all.
Presentation transcript:

MFC Document/View programs

Win32APi vs DocView Win32API Data & display are interrelated Program "knows" about the data Data elements can be "inside" the window class, but unrelated to window itself i.e.; a window may "provide access to" multiple pieces of unrelated data WndProc must distinguish how to process each piece of data Data "value" is independent of how to display the "value" Often need different ways to "see" the data in different windows Sort, format, arrangement on-screen © DJ Foreman 12/28/2018

Doc/View Concepts CDocument (class) Holds the data Manages actions upon the data CView (class) defines the layout & possible user interactions Manages the display of the data Manages user interactions (NOT changes to the data itself!!!), such as select, zoom, copy, move, etc. Still need to create CFrameWnd and CWinApp classes Minimal code required for them © DJ Foreman 12/28/2018

Documents Any kind of data (text, graphics, whatever) 2 kinds of apps: Single Document Interface (SDI) Multiple Document Interface (MDI) more than 1 doc/window is a possible & likely scenario you will see these abbrev's in function names, #defines, etc.) © DJ Foreman 12/28/2018

Programming Approach Similar to Win32API DocView achieves separation of data & rendering Create a Frame Window which displays the view Multiple views possible for same data A View only contains 1 document © DJ Foreman 12/28/2018

Views Document Frame Window Four score and seven years ago our fathers brought forth on this continent, a new nation, conceived in Liberty, and dedicated to the proposition that all men are created equal Four score Created equal © DJ Foreman 12/28/2018

Coordinates documents, views, and frame windows MFC Template Classes Coordinates documents, views, and frame windows Application object creates a template Template coordinates display of the data in a view in a frame window CWinApp object is used to create a Document Template The Document Template creates CDocument object CFrameWnd object CFrameWnd object creates a CView object CView object displays the document data 12/28/2018

Template/ Document/View/Window Application Object Doc Template Doc Object Frame Window View View © DJ Foreman 12/28/2018

Object creation Created at runtime Dynamic creation macros Minimum classes needed: CFrameWnd Cdocument Cview CWinApp Usually in separate .h & .cpp files AppWizard does most of the initialization for you 12/28/2018