Skip to main content

Instructor-led training

Visual C++ Windows Programming Training in Hazelwood, Missouri

This intensive course teaches C++ and Windows programming using Visual C++ and the Microsoft Foundation Class Library (MFC).

What you'll learn

This intensive course teaches C++ and Windows programming using Visual C++ and the Microsoft Foundation Class Library (MFC). The course consists of two modules.
In the first module object oriented concepts are introduced. The Visual C++ development environment is demonstrated. The C++ class construct is introduced and its key features elaborated step-by-step, providing full implementation of abstract data types. C++ memory management is discussed. Function and operator overloading and the use of references are covered. The scope and access control mechanisms of C++ are described. Inheritance is introduced. The use of virtual functions to implement polymorphism is discussed.
The second 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.

Private Training for Teams

This course is offered as private, instructor-led training for organizations, onsite in Hazelwood, Missouri or live online. Dates, delivery format, and course content are arranged around your team's requirements.

This course is not currently scheduled as a public class for individual enrollment.

Request Group Training

Prerequisites

Strong structured programming knowledge and experience

Course Outline

Concepts of Object Oriented Programming Objects
Objects
Information Hiding and Encapsulation
Abstract Data Types
Methods and Messages
Classes
Class Inheritance
Polymorphism

Classes in C++
Data Encapsulation in C and C++
Definition of C++ Classes
Member Data and Functions
this Pointer
Abstract Data Types
Organizing Code for Classes

Functions in C++
Function Prototypes and Type Checking
Conversion of Parameters
Default Arguments
Inline Functions
Function Overloading

Constructors and Destructors
Constructors and Initializations
Object Creation and Destruction
Destructors
Multiple Constructors in a Class
Hidden Constructors

Memory Management in C++
Static, Automatic and Heap Memory
New and Delete
Handling Memory Allocation Errors
Hiding Details of Memory Management in a Class
Implementing a Dynamic String Class

References and Argument Passing in C++
Call by Value
Reference Declarations
Reference Arguments
Copy Constructor
Constant Arguments and Functions

Operator Overloading, Initialization, and Assignment
Operator Overloading
Semantics of Assignment
Initialization vs. Assignment
Overloading Assignment
Type Conversions

Scope and Access Control
Scope in C++
Friend Functions
Const and Enumeration Types
Static Members

Introduction to Inheritance
Inheritance for Modeling and Reuse
Class Derivation
Access Control
Base Class Initialization
Composition
Initializing Class Type Members

Polymorphism and Virtual Functions
Virtual Functions and Dynamic Binding
Polymorphism in C++
Pointer Conversion
Virtual Destructors
Abstract Classes and Pure Virtual Functions

Appendix A. Introduction to Visual C++
Visual C++ Development Environment
Visual Studio
Managing Projects
Compiling and Linking
Debugging

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
Mouse
Using ClassWizard
Using Spy++
Invalidating the Client Area
Keyboard

Graphics Device Interface
Device Contexts
GDI Object Creation and Cleanup
Colors
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
Toolbars
Idle Time Processing
Tooltips
Status Bars

What makes this material hard to master

The course teaches two skills at once: C++ as a language, and event-driven Windows programming through MFC. Each has its own traps, and the second depends on the first.

The language module is about object lifetime. The syllabus moves from classes, member functions and the this pointer through constructors and destructors, then into static, automatic and heap memory, new and delete, and handling allocation failures. Implementing a dynamic string class is where these ideas meet. Once a class owns memory, it needs a correct copy constructor and overloaded assignment. This is why the syllabus separates initialization from assignment and covers reference arguments and const arguments. Many developers from a structured background assume the two are the same, and that is where subtle bugs start.

Inheritance only pays off with virtual functions. Class derivation, base class initialization, composition, dynamic binding, pointer conversion, virtual destructors and pure virtual functions are the points where object-oriented designs usually go wrong. A missing virtual destructor, for example, compiles cleanly and fails only at runtime.

MFC reverses the control flow. A Windows program is a set of handlers for messages, not a sequence of calls. You work through CWinApp and CFrameWnd, Windows messages and message maps. You learn to invalidate the client area instead of drawing on demand. GDI adds its own discipline: device contexts, creating and cleaning up pens and brushes, and releasing what you create.

The later topics build on the earlier ones. Document/view architecture (document templates, SDI and MDI, synchronizing views, persistence) relies on inheritance and virtual functions. Dialogs, menus, update-command-UI messages, toolbars and status bars all route through the same command-message mechanism. The course takes a direct-calls-first approach to MFC before using AppWizard and ClassWizard, so you can see what the generated code does.

Who it suits and what to take around it

The stated prerequisite is strong structured programming knowledge and experience. You do not need prior C++ because the first module introduces it. The course suits developers who know a procedural language well and now need to build or maintain native Windows desktop applications with MFC. It also suits teams that inherit an existing MFC code base.

The syllabus does not cover the Standard Template Library, templates, or smart pointers. After this course, C++ Standard Template Library covers the containers and algorithms that the string-class exercises only hint at. Modern C++ Programming using C++11/C++14 is useful when you want to apply current language idioms to the ownership problems this course introduces. For deeper language design work, Advanced C++ Programming is the natural continuation.

The C++ Programming courses and learning guide shows how the other C++ offerings fit together.

Illustrative scenarios

The scenarios below are illustrations of how the course material can be applied. They are not descriptions of specific organizations or of the course's lab exercises.

  • Maintaining a data-entry tool. A team might support an in-house desktop application built on dialogs, menus and toolbars. The topics on modal and modeless dialogs, dialog data transfer, update-command-UI messages, accelerators and status bars map to the everyday changes such a tool needs.
  • Moving procedural code into classes. A group with a large C-style code base might want to wrap its data handling in abstract data types. The syllabus topics on encapsulation in C versus C++, constructors, copy constructors, operator overloading and virtual destructors cover the concepts such a refactoring depends on.
  • A custom drawing or viewing application. A team might build a viewer for plots or diagrams. It would use device contexts, pens and brushes, mouse and keyboard input, and an SDI or MDI document/view structure with a persistent document class.

AI coding assistants with these topics

AI coding assistants are useful for explaining an unfamiliar message map, summarizing what a compiler diagnostic means, sketching a class skeleton or drafting a test harness for a non-visual class. They can also help you read inherited MFC code.

They are weaker where this course puts its emphasis. Generated classes often own memory but omit the copy constructor or assignment operator. Base classes are often written without a virtual destructor. GDI code may select an object into a device context and never restore the original. Suggestions can also mix in idioms or APIs that do not fit an MFC project, or edit wizard-maintained sections of the code incorrectly. An assistant has no real model of when a message is sent versus posted, or of which view needs updating after a document changes.

To verify: build with high compiler warning levels, step through constructors, destructors and message handlers in the debugger, and use Spy++ to confirm which messages a window receives. Write small tests for copy, assignment and destruction behavior. Treat every generated line that touches ownership or window handles as needing review.

Frequently asked questions

What level is this course?

It is a general-level, five-day course. The first module teaches C++ from the class construct upward, and the second applies it to Windows programming with MFC.

Do I need to know C++ already?

No. The prerequisite is strong structured programming knowledge and experience. Object-oriented concepts and the C++ language are introduced in the first module before MFC begins.

Does it cover the Standard Template Library or modern C++ features?

The syllabus does not list them. It focuses on classes, memory management, references, operator overloading, inheritance, virtual functions, and MFC application structure. Separate HSG courses cover the Standard Template Library and C++11/C++14.

Can this be delivered privately and customized?

Yes. HSG delivers private training for organizations, onsite or live online, and content can be customized, including to the technology versions your team uses. You can request a training proposal to discuss your needs.

Training locations

Visual C++ Windows Programming training across the U.S. and beyond.

We provide private Visual C++ Windows Programming training for organizations, onsite at your location or live online, throughout the United States and internationally.

View all Visual C++ Windows Programming training locations

Train your team with HSG

Private, instructor-led training customized for your organization.

  • Onsite or live online delivery
  • Customized curriculum
  • For a single employee or an entire team
  • Flexible scheduling
  • Experienced instructors
Request Group Training

Questions? Call us at 303.377.6176
or email info@hartmannsoftware.com

Ready to train your team?

Let's customize this training for your organization.

Tell us about your employees, your goals, and your preferred schedule. We'll prepare a training proposal covering scope, delivery format, and pricing.