Free Sample
+ Collection

Microsoft Visual C++ Windows Applications by Example

Stefan Björnander

Code and explanation for real-world MFC C++ Applications
RRP $26.99
RRP $44.99
Print + eBook

Want this title & more?

$12.99 p/month

Subscribe to PacktLib

Enjoy full and instant access to over 2000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

Book Details

ISBN 139781847195562
Paperback440 pages

About This Book

  • Learn C++ Windows programming by studying realistic, interesting examples
  • A quick primer in Visual C++ for programmers of other languages, followed by deep, thorough examples
  • Example applications include a Tetris-style game, a spreadsheet application, a drawing application, and a word processor
  • Each application demonstrates key real-world techniques: parsing text, working with files, creating memory structures, displaying interactive graphics, and more

Who This Book Is For

The book is ideal for programmers who have worked with C++ or other Windows-based programming languages. It provides developers with everything they need to build complex desktop applications using C++.

If you have already learned the C++ language, and want to take your programming to the next level, then this book is ideal for you.

Table of Contents

Chapter 1: Introduction to C++
The Compiler and the Linker
The First Program
Types and Variables
Expressions and Operators
The Preprocessor
The ASCII Table
Chapter 2: Object-Oriented Programming in C++
The Object-Oriented Model
Dynamic Binding
Arrays of Objects
Pointers and Linked Lists
Operator Overloading
Streams and File Processing
Chapter 3: Windows Development
Visual Studio
The Document/View Model
The Message System
The Coordinate System
The Device Context
The Registry
The Cursor
Chapter 4: Ring: A Demonstration Example
The Application Wizard
Colors and Arrays
Catching the Mouse
Drawing the Rings
Setting the Coordinate System and the Scroll Bars
Catching the Keyboard Input
Menus, Accelerators, and Toolbars
The Color Dialog
The Registry
Chapter 5: Utility Classes
The Point, Size, and Rectangle Classes
The Color Class
The Font Class
The Caret Class
The List Class
The Set Class
The Array Class
Error Handling
Chapter 6: The Tetris Application
The Tetris Files
The Figure Class
The Figure Information
Chapter 7: The Draw Application
The Resource
The Class Hierarchy
The Figure Class
The TwoDimensionalFigure Class
The LineFigure Class
The ArrowFigure Class
The RectangleFigure Class
The Ell ipseFigure Class
The TextFigure Class
The FigureFileManager Class
The Document Class
The View Class
Chapter 8: The Calc Application
The Resource
Formula Interpretation
The Spreadsheet
The Document/View Model
Chapter 9: The Word Application
The Resource
The Page
The Document Class
The View Class

What You Will Learn

When you read this book, you will learn to:

  • Build larger, more powerful, user friendly C++ applications
  • Create MDI (multiple document interface) applications and use other Windows application interface elements
  • Create memory structures for complex application objects: documents, spreadsheets, drawings
  • Save files to represent these memory structures
  • Parse and process text, display interactive graphics, and handle input from the mouse and the keyboard

In Detail

With this book you will learn how to create applications using MDI, complex file formats, text parsing and processing, graphics, and interactions. Every essential skill required to build Windows desktop-style applications is covered in the context of fully working examples.

The book begins with a quick primer on the C++ language, and using the Visual C++ IDE to create Windows applications. This acts as a recap for existing C++ programmers, and a quick guide to the language if you've not worked with C++ before. The book then moves into a set of comprehensive example applications, presenting the important parts of the code with explanation of how it works, and how and when to use similar techniques in your own applications.

The applications include: a Tetris-style game, a drawing application, a spreadsheet, and a word processor.

If you know the C++ language, or another Windows-based programming language, and want to use C++ to write real, complex applications then this book is ideal for you.


Read More