MFC Programming for C++ Programmers
Price: $2495
Duration: 5 days | MFC Programming for C++ Programmers Course Schedule
Prerequisites: A working knowledge of C++.
Description: This hands on MFC programming course presents the structure and use of Visual C++ and the Microsoft Foundation Class (MFC) library for Graphical User Interface programming, the Document/View architecture, SDI, MDI, ODBC, and DAO programming. The course includes the use of the Visual Studio automated tools (wizards), but emphasizes a thorough grounding in event driven programming and the MFC object hierarchies. Upon completion of the course, students will understand the structure of the MFC and how the objects interact. The course provides an introduction to how Windows works at the message level, important for debugging as well as for understanding MFC objects. Students will become familiar with important base classes and the inheritance hierarchy; understand how the hierarchies are organized; and learn how MFC objects interact with the Windows operating system.
Developer Studio IDE
- Developer Studio
- Docking Windows
- Project Views: File, Class, Resource
- Using InfoViewer
- Debugging Tools
- AppWizard and ClassWizard
- Building a Skeleton Project
Windows Programming Model
- Windows Software Architecture
- Event-Driven Programming
- Messages and Message Encapsulation
- Windows Libraries and APIs
- Resources and Resource Types
MFC Class Hierarchy
- MFC and the Application Framework
- MFC Base Classes
- Elements of an MFC Program
- MFC Collection Classes
- Iterating Collections
- Documents
- Document/View Architecture
- Frames
- MFC Diagnostic Facilities
- Exceptions
Message Handling
- Message Handling
- The Message Map
- Adding Message Handlers with ClassWizard
The CWND Class
- CWnd Encapsulation of Windows
- CWnd Class Hierarchy
- Changing Window Class Attributes
- Window Activation and Keyboard Focus
Document/View Architecture
- The Document/View Model
- Document and View Classes
- Document Templates
- Saving and Loading Documents
- Using Multiple Views
- SDI and MDI Application Styles
- Decoupling Document and View
- Navigating the Classes
Splitter Windows
- Static and Dynamic Split Views
- Creating a Dynamic Split Window
- Add a Dynamic Splitter as a Separate MDI View
- Integrating a Static Split Window
- Synchronizing Document and Views
Dialogs
- Dialog Modality
- Programming a Modal Dialog
- Programming a Modeless Dialog
- Connecting Code to the Dialog with ClassWizard
- Building Custom Dialogs
- Handling Control Messages
- Using OCX Controls
- Keyboard Traversal
- Data Communication Between Dialog and Parent
- Common Dialog Boxes
- Property Sheets and Tabbed Dialogs
- Connecting a Dialog to a Menu Item
- DDX/DDV
Database Programming
- MFC Capabilities
- The Jet Engine
- MFC Database Classes
- Using CRecordView
- Overview of SQL
- DAO
- What is DAO?
- DAO Objects
- DAO Classes
- AppWizard and ClassWizard Support
- Browsing, Adding, Updating and Deleting Records
- ODBC
- What is ODBC?
- ODBC Administration
- ODBC Classes
- AppWizard & Class Wizard Support
- Browsing, Adding, Updating and Deleting using CRecordSet
Serialization and Persistent
Documents
- CArchive Object
- Document Serialization
- Serializing Pointers
- Creating Persistent Classes
- Serializing CObject Pointers
- Serializing Collections
The Mouse
- Windows Mouse Processing
- CWnd Class Mouse Support
- Capturing the Mouse
- Mouse Cursor
- Using MFC for Drawing with the Mouse
Menus
- Logical Menu Design
- Style Recommendations
- Building a Menu
- Menu Resources
- Command Routing
- Implementing Message Handlers
- Specifying Shortcuts and Accelerators
- Dealing with Unavailable Options
- CMenu Class and Dynamic Context Menus
- MFC Strings and Use of Stringtables
The Keyboard
- Windows Keyboard Conventions
- Keystroke and Character Messages
- Capturing Keystroke Input
MDI and Multiple Views
- SDI vs. MDI Applications
- Multiple View Types
- Multiple Views Under SDI and MDI
- Document Templates
- Instancing a View
- Adding a New Document Class
Controls
- Mapping Control Variables
- Modifying Control Attributes
- Push Buttons, Check Boxes, RadioButtons
- Edit Controls
- List Boxes and Combo Boxes
- Tree Controls
- Spin Buttons, Progress Bars, and Sliders
- Control Views
Introduction to Resources
- Windows Resources Overview
- Icons, Cursors, and Bitmaps
- Toolbars and Status Bars
- Strings and Fonts
- Menus and Dialogs
The Graphics Device Interface
- Device Contexts and CDCs
- GDI Drawing Tools and Attributes
- GDI Object Creation and Cleanup
- Colors
- GDI Coordinate Systems and Mapping Modes
- Regions and Clipping
- Drawing Functions
- Text Functions
- Pens and Brushes
- Fonts
- Bitmaps and DIBs
- Icons and Cursors
Form Views
- Form, Scroll, and Edit Views
- Creating a Form View from a Dialog Template
- Adding a Form View to a Document
- Handling Messages for View Controls
- Initializing and Sizing the Form View
- Preventing User Resizing
