Overview of Previous Lesson(s) Over View 3 Program.

Slides:



Advertisements
Similar presentations
How can Microsoft PowerPoint 2007 help you share information?
Advertisements

Creating a Dialog-Based Comet Windows Program Brian Levantine.
Introduction to Visual Basic.NET Uploaded By: M.Sheraz anjum.
Chapter 10 Database Applications Copyright © 2011 by The McGraw-Hill Companies, Inc. All Rights Reserved. McGraw-Hill.
© by Pearson Education, Inc. All Rights Reserved.
Visual Basic 2010 How to Program. © by Pearson Education, Inc. All Rights Reserved.2.
Guide to Oracle10G1 Introduction To Forms Builder Chapter 5.
Using Visual Basic 6.0 to Create Web-Based Database Applications
CA 121 Intro to Programming Tariq Aziz and Kevin Jones GUI Programming in Visual Studio.NET Chapter 1 Tariq Aziz and Kevin Jones.
Exploring the Basics of Windows XP. Objectives Start Windows XP and tour the desktop Explore the Start menu Run software programs, switch between them,
4 Copyright © 2004, Oracle. All rights reserved. Creating a Basic Form Module.
Compunet Corporation Programming with Visual Basic.NET GUI Week # 11 Tariq Ibn Aziz.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Introduction to Microsoft Windows MFC Programming: the Application/Window Approach Lecture 4.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
1 An Introduction to Visual Basic Objectives Explain the history of programming languages Define the terminology used in object-oriented programming.
Beginning Programming with the Visual Studio.NET Environment.
Chapter 9 Introduction to ActionScript 3.0. Chapter 9 Lessons 1.Understand ActionScript Work with instances of movie clip symbols 3.Use code snippets.
Digital Image Processing Lecture3: Introduction to MATLAB.
McGraw-Hill© 2007 The McGraw-Hill Companies, Inc. All rights reserved. 1-1.
A First Program Using C#
NOTE: To change the image on this slide, select the picture and delete it. Then click the Pictures icon in the placeholder to insert your own image. WEB.
Microsoft Visual Basic 2005: Reloaded Second Edition
Computing IV Visual C Introduction with OpenCV Example Xinwen Fu.
Automating Tasks with Visual Basic. Introduction  When can’t find a readymade macro action that does the job you want, you can use Visual Basic code.
10-1 aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf.
Using Visual Basic 6.0 to Create Web-Based Database Applications
Chapter 11: Introduction to the Visual Basic Environment Spreadsheet-Based Decision Support Systems Prof. Name Position (123) University.
IE 411/511: Visual Programming for Industrial Applications
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
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.
Tutorial 111 The Visual Studio.NET Environment The major differences between Visual Basic 6.0 and Visual Basic.NET are the latter’s support for true object-oriented.
Object Oriented Programming Dr. Ennis-Cole CECS 5100.
Integrated Development Environment (IDE)
MFC Windows Programming: Document/View Approach More detailed notes at: 360/notes-html/class15.htm.
XP New Perspectives on Windows XP Tutorial 1 Exploring the Basics.
NOTE: To change the image on this slide, select the picture and delete it. Then click the Pictures icon in the placeholder to insert your own image. WEB.
Enhancing the Graphical User Interface Multiple Forms, Controls, and Menus.
Copyright © 2010 Wolters Kluwer Health | Lippincott Williams & Wilkins Introduction to Windows Chapter 2.
Irwin/McGraw-Hill Copyright© 2000 by the McGraw-Hill Companies, Inc. PowerPoint® Presentation to accompany prepared by James T. Perry University of San.
Overview of Previous Lesson(s) Over View  Microsoft Foundation Classes (MFC)  A set of predefined classes upon which Windows programming with Visual.
Key Applications Module Lesson 21 — Access Essentials
Copyright 2003 Scott/Jones Publishing Standard Version of Starting Out with C++, 4th Edition Chapter 13 Introduction to Classes.
4 Copyright © 2004, Oracle. All rights reserved. Creating a Basic Form Module.
1 Chapter Nine Using GUI Objects and the Visual Studio IDE.
Visual Basic.NET BASICS Lesson 1 A First Look at Microsoft Visual Basic.NET.
Chapter 2 – Introduction to the Visual Studio .NET IDE
Microsoft Visual Basic 2005 BASICS Lesson 1 A First Look at Microsoft Visual Basic.
3 Copyright © 2004, Oracle. All rights reserved. Working in the Forms Developer Environment.
CITA 342 Section 2 Visual Programming. Allows the use of visual expressions (such as graphics, drawings, or animation) in the process of programming.
Chapter 11: Introduction to VBA Spreadsheet-Based Decision Support Systems Prof. Name Position (123) University Name.
Visual Basic for Application - Microsoft Access 2003 Programming applications using Objects.
Object-Oriented Application Development Using VB.NET 1 Chapter 2 The Visual Studio.NET Development Environment.
Overview of Previous Lesson(s) Over View VP is the methodology in which development allows the user to grab and use the desired tools like menus, buttons,
IE 411/511: Visual Programming for Industrial Applications Lecture Notes #2 Introduction to the Visual Basic Express 2010 Integrated Development Environment.
Overview of Previous Lesson(s) Over View  Windows Programming  WinMain()  Where execution of the program begins and basic program initialization is.
 2002 Prentice Hall. All rights reserved. 1 Introduction to the Visual Studio.NET IDE Outline Introduction Visual Studio.NET Integrated Development Environment.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
Chapter 14 Windows Programming with the Microsoft Foundation Classes
Document/View Architecture
Microsoft Foundation Classes MFC
Chapter 2: The Visual Studio .NET Development Environment
1. Introduction to Visual Basic
Understand Windows Forms Applications and Console-based Applications
Module 1: Getting Started
CIS16 Application Development Programming with Visual Basic
Midterm Exam (2).
Microsoft Windows 7 Basics
Chapter 12 Windows Programming with the Microsoft Foundation Classes
Presentation transcript:

Overview of Previous Lesson(s)

Over View 3 Program

Over View..  Microsoft Foundation Classes (MFC)  A set of predefined classes upon which Windows programming with Visual C++ is built.  Represents an oo approach to Windows programming that encapsulates the Windows API.  MFC does not adhere strictly to the object – oriented principles of encapsulation and data hiding. 4

Over View…  Windows Form  An entity that represents a window of some kind.  A Windows form is encapsulated by a subclass of the System::Windows::Forms::Form class.  Lets try a Message box with previous Form.. 5

Contents  Basic Elements of MFC program  Documents  View  Document Templates  Creating MFC Applications 7

Basic Elements of MFC  The structure of an MFC program incorporates two application - oriented entities.  A document  A view 8

What is a document ??  A document is the collection of data in our application with which the user interacts.  It could be a data for  A game  A geometric model,  A text file or anything we want. 9

What is a document..  Document class is derived from the CDocument class in the MFC library.  Application is not limited to a single document type.  We can define multiple document classes when there are several different kinds of documents involved in application. 10

Document Interfaces  The Single Document Interface (SDI), is supported by the MFC library for programs that require only one document to be open at a time.  A program using this interface is referred to as an SDI application.  MDI is used for programs needing several documents to be open at one time. 11

MDI  MDI manages to handle  Multiple documents of one type.  Documents of different types simultaneously with each document displayed in its own window.  Each document is displayed in a child window of the application window. 12

View  A view is an object that provides a mechanism for displaying some or all of the data stored in a document.  It defines how the data is to be displayed in a window  How the user can interact with it.  Application view class be derived from the MFC class Cview.  The window in which a view appears is called a frame window. 13

Views 14

What is a View..  A document object can have many view objects.  Each view object can provide a different presentation of the document data or a subset of the same data.  For a program handling graphical data,  We could display all of the document data at different scales in separate windows, and also in different formats. 15

Linking  MFC incorporates a mechanism for integrating  A document with its views &  Each frame window with a currently active view.  A document object automatically maintains a list of pointers to its associated views.  A view object has a data member holding a pointer to the document that relates to it. 16

Linking..  Each frame window stores a pointer to the currently active view object.  The coordination among a document, a view, and a frame window is established by another MFC class of objects called document templates. 17 Document Frame View

Document Templates  A Document template manages  The document objects.  The windows frames &  The views associated with each of them.  One document template for each type of document. 18

Over View…  Document Templates  One document template is required for two or more documents of the same type.  A document template object creates  Document objects.  Frame window objects.  Views of a document are created by a frame window object. 19

Document Templates.. 20

Document Template Classes  MFC has two classes for defining document templates.  For SDI applications  CSingleDocTemplate  Has only one document and usually just one view.  For MDI applications  CMultiDocTemplate  Have multiple documents active at one time, so many views. 21

Our Application & MFC 22 Our Application Classes

Over View… 23  MFC provides several variations of the view class that provide a lot of functionality prepackaged.  Standard MFC class CSingleDocTemplate usually suffices in an SDI program.  For MDI program, our document template class is CMultiDocTemplate, which is also derived from CDocTemplate

MFC Application  For development we will use 4 primary tools.  Application Wizard for creating the basic application program code.  Project context menu in ClassView to add new classes and resources.  Class context menu in ClassView for extending and customizing the existing classes.  Resource Editor for creating or modifying objects as menus and toolbars. 24

MFC Application.. 25

MFC Application... 26

SDI Application 27

SDI Application.. 28

SDI Application…  MFC library as a shared DLL.  Reduces the size of the executable file.  Requires the MFC DLL to be on the machine that ’ s running it.  The two modules together (. exe module and the MFC.dll ) may be bigger than statically linked the MFC library. 29

SDI Application…  Static linking.  MFC library routines are included in the executable module for program when it is built.  Statically linked applications run slightly faster.  Tradeoff between memory usage and speed of execution 30

SDI Application…  User Interface Features 31

SDI Application…  Generated Classes 32

View Classes  View Classes capabilities depends on the base class 33

Wizard Output  All the program files generated by the Application Wizard are stored in the TextEditor project folder.  Subfolder to the solution folder with the same name.  There are also resource files in the res subfolder to the project folder.  The IDE provides several ways to view the information relating to project. 34

Wizard Output.. 35

Project Files  19 files shown in the project, excluding ReadMe.txt.  Can view the contents of any of the file.  Contents of the file selected are displayed in the Editor window. 36

Viewing Classes  CTextEditorDoc shows the Class View pane in its docked state 37

Viewing Classes..  Select Global Functions and Variables.  The application object, theApp, appears twice  There is an extern statement for theApp in TextEditor.h and the definition for theApp is in TextEditor.cpp.  Double - click either of the appearances of theApp in Class View, it will leads to the corresponding statement. 38

Viewing Classes..  Indicators is an array of indicators recording the status of  caps lock  num lock  scroll lock  The remaining three variables relate to the management of the toolbars in the application 39

Code  These are all files for this project.  Will discuss it next time… 40

Thank You 41