Microsoft Foundation Classes

Slides:



Advertisements
Similar presentations
Introduction to Visual Basic.NET Uploaded By: M.Sheraz anjum.
Advertisements

MFC Workshop: Intro to the Document/View Architecture.
A graphical user interface (GUI) is a pictorial interface to a program. A good GUI can make programs easier to use by providing them with a consistent.
UNIX Chapter 01 Overview of Operating Systems Mr. Mohammad A. Smirat.
Chapter 1- Visual Basic Schneider1 Chapter 1 An Introduction to Computers and Visual Basic.
VSP Video Station Protocol Presented by : Mittelman Dana Ben-Hamo Revital Ariel Tal Instructor : Sela Guy Presented by : Mittelman Dana Ben-Hamo Revital.
Introduction to Visual Basic. What is Visual Basic? An environment for developing Windows applications Components –A GUI (Graphical User Interface - gooey)
Event-based Programming Roger Crawfis. Window-based programming Most modern desktop systems are window-based. Non-window based environment Window based.
GUI Basics and Event- Driven Programming Feb 7, 2000.
Microsoft Visual Basic 2005 CHAPTER 1 Introduction to Visual Basic 2005 Programming.
Computer for Health Sciences
QualNet 2014/05/ 尉遲仲涵. Outline Directory Structure QualNet Basic Message & Event QualNet simulation architecture Protocol Model Programming.
Visual Basic 2008 Express Edition The IDE. Visual Basic 2008 Express The Start Page Recent Projects Open an existing project Create a New Project.
Hands-on Introduction to Visual Basic.NET Programming Right from the Start with Visual Basic.NET 1/e 6.
Introduction to the Enterprise Library. Sounds familiar? Writing a component to encapsulate data access Building a component that allows you to log errors.
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.
Introduction to Graphical User Interfaces. Objectives * Students should understand what a procedural program is. * Students should understand what an.
An Introduction to Visual Basic
Department of Mechanical Engineering, LSUSession VII MATLAB Tutorials Session VIII Graphical User Interface using MATLAB Rajeev Madazhy
Event Driven Programming
Visual C++ Lecture 11 Friday, 29 Aug Windows Graphic User Interface l Event driven programming environment l Windows graphic libraries (X11 on Unix,
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.
Prepared by Fareeha Lecturer DCS IIUI 1 Windows API.
BZUPAGES.COM Visual Programming Lecture – 5 Miss. SADAF MAJEED SIAL Computer Science Department Bahauddin Zakariya University Multan.
Chapter 1- Visual Basic Schneider1 Chapter 1 An Introduction to Computers and Visual Basic.
VDSL Statistics Tool Eli Gur Eliad Young Mark Shifrin Instructors: Itzhik Ashkenazi, BATM Itai Dabran, Technion.
2. Introduction to the Visual Studio.NET IDE. Chapter Outline Overview of the Visual Studio.NET IDE Overview of the Visual Studio.NET IDE Menu Bar and.
MFC Windows Programming: Document/View Approach More detailed notes at: 360/notes-html/class15.htm.
G RAPHICAL U SER I NTERFACE C ONCEPTS : P ART 1 1 Outline Introduction Windows Forms Event-Handling Model - Basic Event Handling.
Enhancing the Graphical User Interface Multiple Forms, Controls, and Menus.
Overview of Previous Lesson(s) Over View  Microsoft Foundation Classes (MFC)  A set of predefined classes upon which Windows programming with Visual.
Classic Controls Trần Anh Tuấn A. Week 1 How to create a MFC project in VS 6.0 How to create a MFC project in VS 6.0 Introduction to Classic Controls.
OBJECTIVE  After completing this Lab, students will upgrade their knowledge in the field of VC++.  Students will also get the clear view about the concepts.
Create a Simple MFC Application Automatically How to use the application wizard.
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.
Irwin/McGraw-Hill Copyright© 2000 by the McGraw-Hill Companies, Inc. PowerPoint® Presentation to accompany prepared by James T. Perry University of San.
Creating Graphical User Interfaces (GUI’s) with MATLAB By Jeffrey A. Webb OSU Gateway Coalition Member.
CNS 1410 Graphical User Interfaces. Obectives Students should understand the difference between a procedural program and an Event Driven Program. Students.
Object-Oriented Program Development Using Java: A Class-Centered Approach, Enhanced Edition.
CITA 342 Section 2 Visual Programming. Allows the use of visual expressions (such as graphics, drawings, or animation) in the process of programming.
Week 6: Basic GUI Programming Concepts in Java Example: JFrameDemo.java container : a screen window/applet window/panel that groups and arranges components.
Object Oriented Programming.  Interface  Event Handling.
Oracle Forms Oracle Forms Builder provides various tools, which have powerful Graphical User Interfaces (GUI's) to design such forms. All objects, properties,
Overview of Previous Lesson(s) Over View 3 Program.
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.
Activity 2 Creating a blank database 1.Start Microsoft Access and then select ‘File’  ‘New’. 2. Click ‘Blank database’ from the panel on the right.
Chapter 14 Windows Programming with the Microsoft Foundation Classes
Introduction to Windows Programming
Document/View Architecture
Message Handling in MFC
Microsoft Foundation Classes MFC
© 2016, Mike Murach & Associates, Inc.
Steps to Build Frame Window Recipe Application
Customizing custom.
Event Loops and GUI Intro2CS – weeks
Lecture on Oracle Forms
1. Introduction to Visual Basic
Chapter 1: An Introduction to Visual Basic 2015
Introduction to Windows Programming with Microsoft Framework Classes (MFC) Jim Fawcett Summer 2004 Syracuse University.
Understand Windows Forms Applications and Console-based Applications
Standard Controls.
Chapter 2: GUI API Chapter 2.
Event Driven Programming
Hands-on Introduction to Visual Basic .NET
Event Driven Programming
MFC Document/View programs
C++ programming in Windows environment The Borland C++ Builder
Event loops 17-Jan-19.
Event loops.
CMPE 135: Object-Oriented Analysis and Design March 14 Class Meeting
Presentation transcript:

Microsoft Foundation Classes Win32 Application Programming Interface (Win32 API) thousands of C functions: graphics, networking, database, interapplication communications Microsoft Foundation Class (MFC) C++ library of classes that wrap the C function of Win32 API

Windows Programming in MFC event-driven programming model Graphical User Interface (GUI) event mouse click, push button, drag, system failure, … event handler the system queues up events and then dispatches them to procedures known as event handlers callback procedure initialization phase

Event loop example while (theApp.isRunning()) { Event e = nextEvent(); unsigned id = e.getId(); switch (id) { case Event_SingleMouseClick(e); theApp.handleSingleMouseClick(e); break; case Event_DoubleMouseClick(e); theApp.handleDoubleMouseClick(e); case Event_ButtonPush; theApp.handleButtonPush(e); //... other events;

Event loop example – cont. default: ignoreEvent(e); break; }

code generator for MFC AppWizard ClassWizard create project with MFC AppWizard consists of headers (.h files), implementation files (.cpp files), graphics resource file (.rc files), etc… ClassWizard

Document/View architecture VC++ has two main subtypes document/view application dialog-based application document/view architecture model comprises the application’s data view the user’s interface to the model controller handle events generated through the application’s view

Document/View architecture MFC suppose two subtypes of document /view applications single document interface (SDI) multiple document interface (MDI) classes generated by MFC AppWizard CxxxApp (xxx : project name) handle application initialization the programmer often does not change this class

classes generated by MFC AppWizard CxxxDoc represent application’s document (i.e., data) add data and methods to this class CxxxView represent application’s view and controller add callback functions to the class CMainFrame represent the framed windows used often does not change this class

document serialization serialize virtual method to save an object in a standard binary format serializing an object out (i.e., write it to a file) serializing an object in (i.e., read it from a file) sample application: document serialization p. 489