Course Catalog
Curriculum Guides
  .NET
  Java/J2EE
  XML
Downloads
Buy Courseware
Customization
News
Authors
Technical Library
FAQ
About Object Innovations
Opportunities
Contact Us
Home

 

 

   
www.objectinnovations.com
info@objectinnovations.com
877-558-7246 (toll free)  
781-466-8012  

142.  Visual C++ Windows Programming for C Programmers

Rev. 6.1/6.2

 

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.

 

Extensive example programs and lab exercises are provided using Visual C++ 6.0, including some larger scale, cumulative exercises. A file is provided containing all the examples and laboratory exercises in the course.

 

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:  Strong C programming knowledge and experience

 

Module 1. Object Oriented C++ Programming Fundamentals

 

1.      Concepts of Object Oriented Programming

Objects

Information Hiding and Encapsulation

Abstract Data Types

Methods and Messages

Classes

Class Inheritance

Polymorphism

 

2.      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

 

3.      Functions in C++

Function Prototypes and Type Checking

Conversion of Parameters

Default Arguments

Inline Functions

Function Overloading

 

4.      Constructors and Destructors

Constructors and Initializations

Object Creation and Destruction

Destructors

Multiple Constructors in a Class

Hidden Constructors

 

5.      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

 

6.      References and Argument Passing in C++

Call by Value

Reference Declarations

Reference Arguments

Copy Constructor

Constant Arguments and Functions

 

7.      Operator Overloading, Initialization, and Assignment

Operator Overloading

Semantics of Assignment

Initialization vs. Assignment

Overloading Assignment

Type Conversions

 

8.      Scope and Access Control

Scope in C++

Friend Functions

Const and Enumeration Types

Static Members

 

9.      Introduction to Inheritance

Inheritance for Modeling and Reuse

Class Derivation

Access Control

Base Class Initialization

Composition

Initializing Class Type Members

 

10. 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

 

Module 2. MFC Windows Programming Fundamentals

 

1.      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

 

2.      User Input in Windows

Mouse

Using ClassWizard

Using Spy++

Invalidating the Client Area

Keyboard

 

3.      Graphics Device Interface

Device Contexts

GDI Object Creation and Cleanup

Colors

Pens and Brushes

Drawing with Text

 

4.      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

 

5.      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

 

6.      Menus and Resources

Resources in Windows Programs

Developer Studio Resource Editors

String Tables

Menus and Command Messages

Update Command UI Messages

Keyboard Accelerators

 

7.      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

 

8.      Toolbars and Status Bars

Command Messages

MFC Control Bar Classes

Toolbars

Idle Time Processing

Tooltips

Status Bars

 

System Requirements

 

Software:

 

·         NT 4.0 or Windows 2000

·         Visual C++ 6

 

Hardware:

 

·         Pentium 500MHz or equivalent CPU

·         128 Meg of RAM

·         At least 500 megabytes of free disk space

·         CDROM drive or networked to a server with a CDROM drive