Microsoft Visual C++ Windows Applications by Example
|Also available on:|
- 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
Book DetailsLanguage : English
Paperback : 440 pages [ 235mm x 191mm ]
Release Date : June 2008
ISBN : 1847195563
ISBN 13 : 9781847195562
Author(s) : Stefan Björnander
Topics and Technologies : All Books, Application Development, Microsoft Other, Microsoft, .NET
Table of Contents
Chapter 1: Introduction to C++
Chapter 2: Object-Oriented Programming in C++
Chapter 3: Windows Development
Chapter 4: Ring: A Demonstration Example
Chapter 5: Utility Classes
Chapter 6: The Tetris Application
Chapter 7: The Draw Application
Chapter 8: The Calc Application
Chapter 9: The Word Application
Download the code and support files for this book.
Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.
Errata- 8 submitted: last submission 06 Feb 2013
Errata type: Technical | Page number: 12
At the bottom of page 12 under the Enumerations section second paragraph, last line, it says: In the example above, FORD is an integer constant with the value zero, VOLVO has the value one, TOYOTA three, and VOLKSWAGEN four. Should be In the example above, FORD is an integer constant with the value zero, VOLVO has the value one, TOYOTA two, and VOLKSWAGEN three.
Errata type: Code | Page number: 114
Under RingView.cpp delete "CSize sizeTotal;"
Errata type: Code | Page number: 115
Brush and Pen objects are set on the wrong lines, as a result you can't change the color of the Pen.
// Always draws with default settings
pDC->Ellipse(point.x - RADIUS, point.y - RADIUS,
point.x + RADIUS, point.y + RADIUS);
CPen* pOldPen = pDC->SelectObject(&pen); // wrong line
CBrush* pOldBrush = pDC->SelectObject(&brush); // wrong line
} // leaves the scope, so DC settings are gone.
should instead be
CPen* pOldPen = pDC->SelectObject(&pen);
CBrush* pOldBrush = pDC->SelectObject(&brush);
pDC->Ellipse(point.x - RADIUS,point.y - RADIUS,
point.x + RADIUS, point.y + RADIUS);
pDC->SelectObject(pOldPen); //resetting default Pen
pDC->SelectObject(pOldBrush); //resetting default Brush
Errata type: Typo | Page number: 138
Last paragraph, last sentence "...(if it is not empty) is added if to the result if
"... (if it is not empty) is added in to the result if ..."
page no: 10
ASCII stands for "American Standard Code for Information Interchange" and not "American Standard Code for Information Exchange"
Errata type: Typo | Page number: 68
In the diagram at the top of the page, the first pointer pCell1 points to the first Cell.The second pointer is labelled as pCell1 again.It should be pCell2.
Errata type: Typo | Page number: 36
In the section "Call-by-Value and Call-by-Reference" the line: "Then iNum1 and iNum2 exchange values with the help if iTemp." should be: "Then iNum1 and iNum2 exchange values with the help of iTemp."
Errata type: Code | Page number: 36
At the top of page 36, there is some code as mentioned below. The last comment should be 2 because iNumber is initialized with 2.
int g_iNumber = 1;
int iNumber = 2;
cout << "Global variable: " << g_iNumber // 1
<< ", Local variable: " << iNumber; // 2 }
What you will learn from this book
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
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.
Visual C++ is an established development language for Windows desktop applications. This book shows you how to develop professional, real-life applications by examining real world examples. It is fast, and used in millions of applications throughout the world.
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.