Table of Contents

Cover

Title

Copyright

Dedication

About the Author

About The Technical Editor

Credits

Acknowledgments

Introduction

Chapter 1: Programming with Visual C++ 2010

The .NET Framework

The Common Language Runtime

Writing C++ Applications

Learning Windows Programming

What Is the Integrated Development Environment?

Using the IDE

Summary

Chapter 2: Data, Variables, and Calculations

The Structure of a C++ Program

Defining Variables

Fundamental Data Types

Basic Input/Output Operations

Calculating in C++

Type Conversion and Casting

The Auto Keyword

Discovering Types

The Bitwise Operators

Introducing Lvalues and Rvalues

Understanding Storage Duration and Scope

Namespaces

C++/CLI Programming

Discovering C++/CLI Types

Summary

Chapter 3: Decisions and Loops

Comparing Values

Repeating a Block of Statements

C++/CLI Programming

Summary

Chapter 4: Arrays, Strings, and Pointers

Handling Multiple Data Values of the Same Type

Indirect Data Access

Dynamic Memory Allocation

Using References

Native C++ Library Functions for Strings

C++/CLI Programming

Summary

Chapter 5: Introducing Structure into Your Programs

Understanding Functions

Passing Arguments to a Function

Returning Values from a Function

Recursive Function Calls

C++/CLI Programming

Summary

Chapter 6: More about Program Structure

Pointers to Functions

Initializing Function Parameters

Exceptions

Handling Memory Allocation Errors

Function Overloading

Function Templates

Using the decltype Operator

An Example Using Functions

C++/CLI Programming

Summary

Chapter 7: Defining Your Own Data Types

The struct in C++

Data Types, Objects, Classes, and Instances

Understanding Classes

Class Constructors

Private Members of a Class

The Pointer this

const Objects

Arrays of Objects

Static Members of a Class

Pointers and References to Class Objects

C++/CLI Programming

Summary

Chapter 8: More on Classes

Class Destructors

Implementing a Copy Constructor

Sharing Memory Between Variables

Operator Overloading

The Object Copying Problem

Class Templates

Using Classes

Organizing Your Program Code

Native C++ Library Classes for Strings

C++/CLI Programming

Summary

Chapter 9: Class Inheritance and Virtual Functions

Object-Oriented Programming Basics

Inheritance in Classes

Access Control Under Inheritance

The Copy Constructor in a Derived Class

Class Members as Friends

Virtual Functions

Casting Between Class Types

Nested Classes

C++/CLI Programming

Summary

Chapter 10: The Standard Template Library

What Is the Standard Template Library?

The Range of STL Containers

Sequence Containers

Associative Containers

More on Iterators

More on Function Objects

More on Algorithms

Lambda Expressions

The STL for C++/CLI Programs

Lambda Expressions in C++/CLI

Summary

Chapter 11: Debugging Techniques

Understanding Debugging

Basic Debugging Operations

Adding Debugging Code

Debugging a Program

Testing the Extended Class

Debugging Dynamic Memory

Debugging C++/CLI Programs

Summary

Chapter 12: Windows Programming Concepts

Windows Programming Basics

The Structure of a Windows Program

Windows Program Organization

The Microsoft Foundation Classes

Using Windows Forms

Summary

Chapter 13: Programming for Multiple Cores

Parallel Processing Basics

Introducing the Parallel Patterns Library

Algorithms for Parallel Processing

A Real Parallel Problem

Critical Sections

The combinable Class Template

Tasks and Task Groups

Summary

Chapter 14: Windows Programming with the Microsoft Foundation Classes

The Document/View Concept in MFC

Creating MFC Applications

Summary

Chapter 15: Working with Menus and Toolbars

Communicating with Windows

Extending the Sketcher Program

Elements of a Menu

Adding Handlers for Menu Messages

Adding Toolbar Buttons

Menus and Toolbars in a C++/CLI Program

Summary

Chapter 16: Drawing in a Window

Basics of Drawing in a Window

The Drawing Mechanism in Visual C++

Drawing Graphics in Practice

Programming for the Mouse

Exercising Sketcher

Drawing with the CLR

Summary

Chapter 17: Creating the Document and Improving the View

Creating the Sketch Document

Improving the View

Deleting and Moving Shapes

Implementing a Context Menu

Dealing with Masked Elements

Extending CLR Sketcher

Summary

Chapter 18: Working with Dialogs and Controls

Understanding Dialogs

Understanding Controls

Creating a Dialog Resource

Programming for a Dialog

Supporting the Dialog Controls

Completing Dialog Operations

Using a Spin Button Control

Using the Scale Factor

Using the CTaskDialog Class

Working with Status Bars

Using a List Box

Using an Edit Box Control

Dialogs and Controls in CLR Sketcher

Summary

Chapter 19: Storing and Printing Documents

Understanding Serialization

Serializing a Document

Applying Serialization

Exercising Serialization

Printing a Document

Implementing Multipage Printing

Serialization and Printing in CLR Sketcher

Summary

Chapter 20: Writing Your Own DLLs

Understanding DLLs

Deciding What to Put in a DLL

Writing DLLs

Summary

Index

Advertisement

End User License Agreement

List of Illustrations

Chapter 1: Programming with Visual C++ 2010

FIGURE 1-1

FIGURE 1-2

FIGURE 1-3

FIGURE 1-4

FIGURE 1-5

FIGURE 1-6

FIGURE 1-7

FIGURE 1-8

FIGURE 1-9

FIGURE 1-10

FIGURE 1-11

FIGURE 1-12

FIGURE 1-13

FIGURE 1-14

FIGURE 1-15

FIGURE 1-16

FIGURE 1-17

FIGURE 1-18

FIGURE 1-19

FIGURE 1-20

FIGURE 1-21

FIGURE 1-22

FIGURE 1-23

FIGURE 1-24

FIGURE 1-25

Chapter 2: Data, Variables, and Calculations

FIGURE 2-1

FIGURE 2-2

FIGURE 2-3

FIGURE 2-4

FIGURE 2-5

FIGURE 2-6

FIGURE 2-7

FIGURE 2-8

FIGURE 2-9

FIGURE 2-10

FIGURE 2-11

FIGURE 2-12

FIGURE 2-13

FIGURE 2-14

Chapter 3: Decisions and Loops

FIGURE 3-1

FIGURE 3-2

FIGURE 3-3

FIGURE 3-4

FIGURE 3-5

FIGURE 3-6

Chapter 4: Arrays, Strings, and Pointers

FIGURE 4-1

FIGURE 4-2

FIGURE 4-3

FIGURE 4-4

FIGURE 4-5

FIGURE 4-6

FIGURE 4-7

FIGURE 4-8

FIGURE 4-9

Chapter 5: Introducing Structure into Your Programs

FIGURE 5-1

FIGURE 5-2

FIGURE 5-3

FIGURE 5-4

Chapter 6: More about Program Structure

FIGURE 6-1

FIGURE 6-2

FIGURE 6-3

FIGURE 6-4

FIGURE 6-5

FIGURE 6-6

FIGURE 6-7

FIGURE 6-8

Chapter 7: Defining Your Own Data Types

FIGURE 7-1

FIGURE 7-2

FIGURE 7-3

FIGURE 7-4

FIGURE 7-5

FIGURE 7-6

FIGURE 7-7

Chapter 8: More on Classes

FIGURE 8-1

FIGURE 8-2

FIGURE 8-3

FIGURE 8-4

FIGURE 8-5

FIGURE 8-6

FIGURE 8-7

FIGURE 8-8

FIGURE 8-9

FIGURE 8-10

FIGURE 8-11

FIGURE 8-12

FIGURE 8-13

FIGURE 8-14

FIGURE 8-15

Chapter 9: Class Inheritance and Virtual Functions

FIGURE 9-1

FIGURE 9-2

FIGURE 9-3

FIGURE 9-4

FIGURE 9-5

FIGURE 9-6

Chapter 10: The Standard Template Library

FIGURE 10-1

FIGURE 10-2

FIGURE 10-3

FIGURE 10-4

Chapter 11: Debugging Techniques

FIGURE 11-1

FIGURE 11-2

FIGURE 11-3

FIGURE 11-4

FIGURE 11-5

FIGURE 11-6

FIGURE 11-7

FIGURE 11-8

FIGURE 11-9

FIGURE 11-10

FIGURE 11-11

FIGURE 11-12

FIGURE 11-13

FIGURE 11-14

FIGURE 11-15

FIGURE 11-16

FIGURE 11-17

FIGURE 11-18

Chapter 12: Windows Programming Concepts

FIGURE 12-1

FIGURE 12-2

FIGURE 12-3

FIGURE 12-4

FIGURE 12-5

FIGURE 12-6

FIGURE 12-7

FIGURE 12-8

Chapter 13: Programming for Multiple Cores

FIGURE 13-1

FIGURE 13-2

FIGURE 13-3

Chapter 14: Windows Programming with the Microsoft Foundation Classes

FIGURE 14-1

FIGURE 14-2

FIGURE 14-3

FIGURE 14-4

FIGURE 14-5

FIGURE 14-6

FIGURE 14-7

FIGURE 14-8

FIGURE 14-9

FIGURE 14-10

FIGURE 14-11

FIGURE 14-12

FIGURE 14-13

FIGURE 14-14

FIGURE 14-15

Chapter 15: Working with Menus and Toolbars

FIGURE 15-1

FIGURE 15-2

FIGURE 15-3

FIGURE 15-4

FIGURE 15-5

FIGURE 15-6

FIGURE 15-7

FIGURE 15-8

FIGURE 15-9

FIGURE 15-10

FIGURE 15-11

FIGURE 15-12

FIGURE 15-13

FIGURE 15-14

FIGURE 15-15

FIGURE 15-16

FIGURE 15-17

FIGURE 15-18

FIGURE 15-19

FIGURE 15-20

FIGURE 15-21

FIGURE 15-22

FIGURE 15-23

FIGURE 15-24

FIGURE 15-25

Chapter 16: Drawing in a Window

FIGURE 16-1

FIGURE 16-2

FIGURE 16-3

FIGURE 16-4

FIGURE 16-5

FIGURE 16-6

FIGURE 16-7

FIGURE 16-8

FIGURE 16-9

FIGURE 16-10

FIGURE 16-11

FIGURE 16-12

FIGURE 16-13

FIGURE 16-14

FIGURE 16-15

FIGURE 16-16

FIGURE 16-17

FIGURE 16-18

FIGURE 16-19

Chapter 17: Creating the Document and Improving the View

FIGURE 17-1

FIGURE 17-2

FIGURE 17-3

FIGURE 17-4

FIGURE 17-5

FIGURE 17-6

FIGURE 17-7

FIGURE 17-8

Chapter 18: Working with Dialogs and Controls

FIGURE 18-1

FIGURE 18-2

FIGURE 18-3

FIGURE 18-4

FIGURE 18-5

FIGURE 18-6

FIGURE 18-7

FIGURE 18-8

FIGURE 18-9

FIGURE 18-10

FIGURE 18-11

FIGURE 18-12

FIGURE 18-13

FIGURE 18-14

FIGURE 18-15

FIGURE 18-16

FIGURE 18-17

FIGURE 18-18

FIGURE 18-19

FIGURE 18-20

FIGURE 18-21

FIGURE 18-22

FIGURE 18-23

FIGURE 18-24

Chapter 19: Storing and Printing Documents

FIGURE 19-1

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!