Chabot College Fall 2003 Removed Fall 2006

advertisement
Chabot College
Fall 2003
Removed Fall 2006
Course Outline for Computer Science 27A
INTRODUCTION TO MFC PROGRAMMING
Catalog Description:
27A - Introduction to MFC programming
2 units
Introduction to Windows programming using Microsoft Foundation Classes (MFC). Dialogs and
controls, message handling, graphics, animation, the MFC class hierarchy, the MFC AppWizard,
document/view architecture, ActiveX controls. Prerequisite: Computer Science 15 or equivalent;
1.5 hours lecture, 1.5 hours laboratory.
Prerequisite Skills:
Upon entry to this course the student should be able to:
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
explain the steps in the software engineering lifecycle;
use accepted design methods (structure charts, pseudocode, simple class diagrams) to
develop and code several (six-ten) programs of intermediate difficulty and length in the C++
language, including programs broken into several files;
adhere to style and documentation standards in writing programs;
use system debuggers to step into and over code, set breakpoints and watch variables;
identify what makes a good test data suite and use it to thoroughly test a program under
development;
write C++ overloaded functions, simple recursive functions, function templates;
define, initialize, dereference and manipulate pointers;
manipulate arrays using pointer notation;
define, design and use simple C++ classes, including at least one project that uses a class
inheritance hierarchy;
manipulate both standard C-strings using the cstring library and string objects using the
ANSI string library.
Expected Outcome for Students:
Upon completion of this course the student should be able to:
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
use the AppWizard to create an MFC-based project;
create Graphical User Interfaces (GUIs) using MFC dialogs and controls;
design, write, debug and document MFC-based applications;
use Hungarian notation to incorporate type and scope information in variable names;
use document/view architecture to create single and multiple document interfaces;
write event handlers for Windows and Command messages;
design and implement a drawing program using device contexts;
use CFont, CPen, CBitmap, CBrush, CPalette and other graphics classes;
create an animation program using timers;
write a simple program incorporating ActiveX controls;
use MFC Utility classes including CString, CPoint, CRect, CTime and CList.
Chabot College
Course Outline for Computer Science 27A
Fall 2003
Course Content:
1. Using the Visual Studio IDE
a. The AppWizard: creating the basic framework for an MFC application
b. The Class Wizard: adding classes and event handlers to your program
c. The Resource Editor: creating menus, toolbars and icons
2. MFC Class Hierarchy
a. CCmdTarget, CWnd, CDocument, CWinThread
b. CWinApp, CFrameWnd, CView
3. Message Handling
a. Message Maps
b. Message Handler Definitions
c. Message Categories
i. Windows Messages
ii. Control Notification Messages
iii. Command Messages
d. How messages are processed
e. Using the Class Wizard to create message handlers for Windows messages
4. MFC menus, dialogs and controls
a. Creating Menu resources and handling menu messages
b. Creating a Dialog resource and CDialog class
c. Modal and Modeless Dialogs
d. Common controls: buttons, scroll bars, list boxes, edit boxes, combo boxes, labels
e. Message handlers for menus and controls
5. Document/View Architecture
a. Single Document Interface (SDI) vs. Multiple Document Interface (MDI)
b. Linking a document with its views
c. Document Templates
6. Graphics
a. Device contexts: CDC and CClientCD classes
b. The window client area and mapping modes
c. Basic drawing operations: lines, circles, ellipses, arcs, rectangles
d. CFont, CPen, CBitmap, CBrush, CPalette and other graphics classes
e. Drawing modes
f. Bitmaps and images
7. Animation
a. Timers
b. Reducing flicker via bitmaps
8. ActiveX controls
Method of Presentation:
1.
2.
Lecture
In-class example programs with explanations and demonstrations
Page 2
Chabot College
Course Outline for Computer Science 27A
Fall 2003
Assignments and Methods of Evaluating Student Progress:
1. Typical assignments:
Several short to medium length programs illustrating concepts from lecture such as a:
a.
calculator program using graphical controls;
b.
password validation program;
c.
simple text editor with multiple views;
d.
GUI program with basic library functions (search for a book, check out a book etc.);
e.
sketcher program similar to Microsoft Paint;
f.
simple animated game program such as Pong or Asteroids;
g.
simple ActiveX control embedded in a web page.
2. Methods of evaluation:
a.
Midterm exams
b.
Short quizzes
c.
Final exam
Textbook(s) (Typical):
Beginning Visual C++ 6, Ivor Horton, Wrox Press, April 2000
Special Student Materials:
Computer lab fee
Jonathan Traugott
Sept 2002
Page 3
Download