MFC Windows Programming for C++ Programmers Training

Answers to Popular Questions:

Yes, this class can be tailored to meet your specific training needs.
Yes, we provide C++ consulting services.
Yes, group discounts are provided.

Course Description

This course is a very thorough presentation of Windows programming via an object oriented approach using Visual C++ and the Microsoft Foundation Class Library. The course consists of two modules. The first module covers the essential elements of Windows programming via an object oriented approach using Visual C++ and the MFC. The basic structure of Windows programs and the MFC encapsulation is explained, and then the power of MFC and the Visual C++ development environment is exploited to build working Windows applications. The student will gain experience using the Visual Studio, AppWizard, and ClassWizard. Fundamental Windows programming topics are covered, including the mouse, keyboard, Graphics Device Interface, controls, dialog boxes, menus, toolbars and status bars. The document/view architecture is introduced. A fundamental approach is taken to understanding MFC, building programs by making direct calls to MFC before using automated tools. The second module covers intermediate topics in MFC Windows programming. Mouse programming techniques are discussed, including rubberbanding and drag and drop. Additional topics in dialog boxes are covered, including the common dialogs and programming modeless dialogs. Fonts are discussed. MFC services are covered, including runtime type information, serialization, diagnostics and exceptions. The MFC collection classes are surveyed, including the template collection classes. Document/view architecture is presented in greater depth, including MDI and the role of document templates in dealing with multiple view types and multiple document types. The student is introduced to a number of advanced topics, including the MFC database classes, the Win32/64 common controls, and DLLs. OLE and ActiveX are introduced, including use of ActiveX controls. Extensive programming examples and exercises are provided using Visual C++ 2008 (Library mfc90.dll). Besides doing standalone exercises, during the course the student will develop several cumulative Windows applications. A disk is provided containing all the examples and laboratory exercises in the course.
Course Length: 5 Days
Course Tuition: $2090 (US)


Knowledge of C++. Previous SDK Windows programming experience is not required.

Course Outline


Introduction to Windows Programming and MFC
Structure of Windows Programs
Application Frameworks
Class Hierarchy of the MFC Library
CWinApp and CFrameWnd Classes
Event-Driven Programming
Windows Messages
Message Maps

User Input in Windows
Using ClassWizard
Using Spy++
Invalidating the Client Area

Graphics Device Interface
Device Contexts
GDI Object Creation and Cleanup
Pens and Brushes
Drawing with Text

More About Windows
MFC Encapsulation of Windows
Window Creation and Destruction
Focus and Activation
Sending and Posting Messages
Overlapped, Popup and Child Windows
Child Windows and Owned Windows

Document/View Architecture
Using AppWizard
Document and View Classes
Document Templates
SDI and MDI Applications
Document/View Program Structure
Synchronizing Document and Views
Making a Document Persistent

Menus and Resources
Resources in Windows Programs
Developer Studio Resource Editors
String Tables
Menus and Command Messages
Update Command UI Messages
Keyboard Accelerators

Controls and Dialogs
Modal and Modeless Dialog Boxes
Resources and Controls
Controls as Child Windows
CDialog Class and Programming a Modal Dialog
Designing Dialogs with Dialog Editor
Using ClassWizard
Dialog Data Transfer

Toolbars and Status Bars
Command Messages
MFC Control Bar Classes
Idle Time Processing
Status Bars

Mouse Techniques
Mouse Messages
Mouse Handler Functions
Capturing the Mouse
Mouse Cursor
Rubberband Drawing
Drag and Drop

MFC Services
General Purpose Classes
Serialization and Persistent Objects
Runtime Type Information in MFC

MFC Collection Classes
List, Dynamic Array and Map Classes
Making Collection Objects Persistent
MFC Template Collection Classes

More About Dialog Boxes
Modeless Dialogs as Child Windows
Communicating Between a Dialog and its Parent
Programming a Modeless Dialog
Combo Boxes and List Boxes
Common Dialogs
Common Font Dialog

More About Document/View
Multiple Document Interface
MFC Classes that Implement MDI
Implementing MDI Applications with MFC
Multiple View Types
Special View Classes
Form View Based Applications

Windows Common Controls
Win32 Common Controls
MFC Common Control Classes
Progress and Slider Controls
Tree View Control

MFC Database Classes
ODBC Architecture
MFC Classes for ODBC
Record Field Exchange
Scrolling in a Recordset
Choosing a Data Source at Runtime
Record Sets and Record Views
Data Access Objects
MFC Classes for DAO

Dynamic Link Libraries
What is a Dynamic Link Library (DLL)
Creating a DLL
Debugging a DLL

Introduction to ActiveX
COM, OLE and ActiveX
ActiveX Controls

Course Directory [training on all levels]

Upcoming Classes
Gain insight and ideas from students with different perspectives and experiences.

Interesting Reads Take a class with us and receive a book of your choosing for 50% off MSRP.