GUI & Windows Programming Course Information: Dr. Richard R. Eckert
GUI & Windows Programming Course Information: Dr. Richard R. Eckert
Policies
Evaluation Assignments
Individual
Programming Assignments 45% Due on due date, but can be turned in to CS-360
drop drawer in filing cabinet outside CS
Term Examinations (2) 40% Department any time that day or night
Final Project 15% 5% off for every day late
) Weekends and holidays not included
No assignments accepted more than one week
late
Originality
Any work found to be copied will be grounds
for an F in the course
1
Course Schedule (weekly)
Course Schedule (continued)
1. Intro to GUIs & Windows Programming
2. Using Visual Studio,Win32 API Programming 10. COM, ActiveX, & ATL
3. MFC Programming: App/Window Approach 11. Multitasking & Multithreading; DLLs
4. MFC Programming: Doc/View Approach 12. Network Programming with TCP/IP Sockets;
5. Graphics, Animation, Bitmaps, Timers Creating Web Services
6. Windows Controls, Dialog Boxes 13. .NET Managed Code & the Common Language
7. Printing, Mapping modes, Serialization, File I/O, Runtime
Dialog-based Apps, Windows Common Dialogs 14. Program Integration: Multilanguage Apps,
8. Toolbars & Status Bars; Windows Clipboard; Mixing .NET Managed & Unmanaged Code
Multimedia Programming 15. The X Window System
9. ODBC & ADO Data Bases 16. X Toolkit Intrinsics, OSF/Motif Toolkit
2
Graphical Interfaces, Continued Main Feature of GUIs:
Use graphics to organize user workspace THE WINDOW
Environment allows many tasks to be Rectangular area of screen onto which a
performed simultaneously program draws text and graphics.
Different tasks share screen space User interacts with program using
Visually rich way of conveying information pointer device to select objects inside.
WYSIWYG display of documents Some window components:
) border, title bar, client area, menu bar, tool bars,
scroll bars, max/min/close buttons, etc.
3
Recent History (Microsoft) Other GUI-Windowing Systems
1995: Windows 95 IBM OS/2: Presentation Manager
Runs on 4 Meg, long file names, plug and play, new
controls, new desktop/window style Sun Microsystems: Java
Hybrid 16/32 bit OS, depends on DOS, lacks security of AWT
NT, no portability to RISC
Swing
1998: Windows 98
Integrated Web functionality Platform independent
2000-01: Windows 2000, ME, XP JDK is free
Upgradesof 95-98-NT The X Window System
95->98->Me->XP Home: for home use
Developed at MIT, late 1980s
NT->2000->XP Professional: for businesses
XP: Networked graphics programming interface
) fancier user interface; latest multimedia (DVD); upgraded web Independent of machine architecture/OS (but
& network capabilities; improved help (remote); improved
performance & security most used under UNIX)
4
Microsoft .NET Framework X-Windows Programming
5
Windows Memory Management
Windows Object Orientation
Older versions: 16-bit, segmented memory
Dictated by processor architecture
A window is handled like a C++ object Hard to program
Hasa user-defined type (Windows class) Newer versions: 32-bit, flat memory model
Instances
of class created at run time Easier to program
Messages sent to windows affect their behavior
As old programs terminate, new ones start
Code swapped into and out of memory
Fragmentation can occur
Windows must consolidate memory space
Moves blocks of code/data continually
6
Pros/Cons of Dynamic Linking Device Independent Graphics Interface
Windows programs don’t access hardware devices
Smaller programs (code is not in program) directly
DLL can be used by many programs with Make calls to generic functions within the
Windows ‘Graphics Device Interface’ (GDI)
no memory penalty
The GDI translates these into HW commands
Only loaded once!
Updates to DLLs don’t require Program GDI Hardware
recompilation of programs using them
Disadvantage--DLL must be present at run
time ==> no standalone programs
7
MFC Library
Microsoft’s C++ Interface to Windows API
O-O Approach to Windows Programming
Some 200 classes
API functions encapsulated in the MFC
Classes derived from MFC do grunt work
Just add data/functions to customize app
Provides a uniform application framework
8
Components of .NET Common Language Runtime
The .NET Framework Class Library (FCL)` Automatic garbage collection
Organized into namespaces (like packages)
Elimination of memory leaks
Handle things like: Data, IO (simple & file), Windows
& Web Forms, Windows Controls, User Interfaces, Code access security
Drawing, Threading, Exceptions, Networking, Web Simplified versioning
Services, Data Bases, XML, ASP, Security,
Collections, … lots of others Simple & reliable deployment
Common Type System (CTS) Deep cross-language integration & inheritance
Common Language Specification (CLS) Debugging/profiling across different languages
Common Language Runtime (CLR) Performance
Scalability
9
Sequential vs. Event-Driven Programming
10