Windowing and Windows ™ Applications
Richard Halstead-Nussloch, Ph.D.
July 8, 2002
Outline
What is the Windows Application of "Windows Application Development?"
Windowing application versus Microsoft Windows ™ application
The structure of any modern windowing application illustrated by Microsoft Windows
Discussion and Q & A
What is the Windows Application of "Windows Application Development?"
A Windows Application is a windowing application built with the Microsoft Foundation Classes (MFC)
WIMP (windows, icon, menu, pointer) GUI
Event-driven, Multi-processing
OOP, Client-Server, Component-based, Distributed Computing etc. are now supported, but not initially in MS Windows
Windowing application versus Microsoft Windows ™ application
Windowing application:
- Event-driven, not necessarily multi-processing
- Windows, but not necessarily WIMP or GUI
- Not necessarily OOP, client-server, component-based, distributed computing, etc.
The structure of any modern windowing application as illustrated by Microsoft Windows
We’ll go through some of the things you need to know
Object
An object is actually what runs in the computer
Is an instance of a class
Encapsulates data and methods (functions)
In OOP and OOD, the things you think about first in designing a program
In the MFC, "Object" is the name of the root class (Cobject in MFC nomenclature)
Class
A class is a template for objects
In OOP a class is a template definition of the methods and variables in a particular kind of object
Classes are structured in hierarchies
Inheritance, where subclasses can inherit methods and variables of their super-classes
Composition, where constituent parts are assembled to make (larger) whole objects
Threads and Applications
A thread is context (placeholder) information associated with a single use of a program that can handle multiple concurrent users (or uses or requests)
An application (program) is any program designed to perform a specific function directly for the user or another application program
Threads and Applications in the MFC Application Architecture
CObject
CCmdTarget
CWinThread
CWinApp
-user application
The above support (in the latest Windows)
Multi-processing, -tasking, -threading, Client-Server, Distributed, Event-driven Computing
OOP--Component-Based programming
Windows, Devices, and Controls
A window is an enclosed, rectangular area on a display screen. Most modern operating systems divide the display real-estate into multiple windows
A device is any computer hardware device
A control is
physical when it can be directly manipulated, e.g., a key
display when it can be indirectly manipulated, e.g., a command button in VB
Windows, Devices, and Controls in MFC Window Support
Cobject (examples below)
CDC
CPaintDC
CWnd
CFrameWnd
CDialog
CButton
The above support (in the latest Windows)
Client-Server, Distributed, Event-driven WIMP
OOP Component-Based programming ActiveX
Objects encapsulate
Variables (Data), e.g., window size, button caption, device contexts
Methods (member functions), e.g., event handlers
For example, Control Objects
Message processing methods, e.g., click
Message sending capability, e.g., text1.text=number_of_seconds
Objects can be components, e.g., ActiveX
Discussion Q & A
What representative role to VB Class Modules play in windows application development?
What is the relationship between the VB implementation of MFC-based Windows application development and the "Make-Buy" IT decision?