Visual C++ Windows Programming(For C Programmers)

 

This course teaches C++ and Windows programming using Visual C++ and the Microsoft Foundation Class Library (MFC). Object oriented concepts are introduced, and those portions of C++ most essential to Windows programming using MFC are covered. Emphasis is placed on the features of C++ that support abstract data types, inheritance, and polymorphism. A working knowledge of Windows programming is quickly established using the Visual C++ development environment. The student will gain experience using the Developer Studio, AppWizard, and ClassWizard. Fundamental Windows programming topics are covered, including event handling, Graphics Device Interface, the mouse, menus and resources, controls, modal and modeless dialog boxes, the keyboard, Windows memory management, and MDI. The MFC document/view architecture is presented. Techniques are presented for implementing Windows applications in multiple environments, including Windows NT, Windows 95 and 16-bit Windows. Extensive programming examples and exercises are provided using Visual C++ 4.0 and Microsoft Foundation Class Library 4.0.

 

LEARNING OBJECTIVES

 

· Learn object oriented concepts necessary to understand the Visual C++ approach to developing Windows applications.

· Acquire a working knowledge of C++ programming.

· Learn use of the Visual C++ development tools, Developer Studio, AppWizard, and ClassWizard

· Gain a basic understanding of the structure of the Microsoft Foundation Class Library

· Acquire a working knowledge of Windows programming using Visual C++ and MFC

 

Course Duration: 5 days.

 

Prerequisites: Experience in C programming. Previous knowledge of C++ or Windows SDK programming is not required but is preferred.

 

DETAILED OUTLINE

 

Concepts of Object Oriented Programming

Objects

Abstraction and Encapsulation

Abstract Data Types

Methods and Messages

Classes and Instantiation

Class Inheritance

Polymorphism

Introduction to Visual C++

Application Frameworks

Data/View Architecture

Developer Studio

Managing Projects

Compiling and Linking

Debugging

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

Windows Event Handling

Using AppWizard

Event-Driven Programming

Windows Messages

Message Maps

ClassWizard

SDK Spy Tool

Invalidating the Client Area

Graphics Device Interface

Device Contexts

GDI Object Creation and Cleanup

Colors

Pens and Brushes

Coordinate Systems

The Mouse

Mouse Messages

Mouse Handler Functions

Capturing the Mouse

Mouse Cursor

Rubberband Drawing

Drag and Drop

Menus and Resources

Resources in Windows Programs

Developer Studio Resource Editors

String Tables

Menus and Command Messages

Update Command UI Messages

Keyboard Accelerators

Floating Popup Menus

Dialog Boxes with MFC

Modal and Modeless Dialog Boxes

Resources and Controls

CDialog Class and Programming a Modal Dialog

Designing Dialogs with Dialog Editor

Using ClassWizard

Dialog Data Storage

Dialog Data Transfer

More about Dialog Boxes

Additional Windows Controls

MFC Control Classes

Dialogs as Child Windows

Programming a Modeless Dialog

Common Dialogs

The Keyboard

Windows Keyboard Conventions

Keystroke Messages

Character Message

Capturing Keystroke Input

The Caret

Document/View Architecture and MDI

Document and View Classes

Document Templates

SDI and MDI Applications

Document/View Program Structure

Synchronizing Document and Views

Making a Document Persistent

Multiple Document Interface

Memory Management and Windows Application Portability

32 Bit Programming

16 and 32 Bit Memory Management

Intel Segment Architecture

Memory Models

Porting 16-Bit MFC Applications to Win32

Multiplatform Development Strategy

Return to Table of Contents