Book Image

Microsoft Visual C++ Windows Applications by Example

By : Stefan Bjornander, Stefan Björnander
Book Image

Microsoft Visual C++ Windows Applications by Example

By: Stefan Bjornander, Stefan Björnander

Overview of this book

Table of Contents (15 chapters)
Microsoft Visual C++ Windows Applications by Example
Credits
About the Author
About the Reviewer
Preface
Index

Chapter 3. Windows Development

The development environment of choice in this book is the Visual Studio from Microsoft. In this chapter we also study the Microsoft Foundation Classes (MFC).

  • Visual Studio provides us with a few Wizards—tools that help usgenerate code. The Application Wizard creates an application framework(a skeleton application) to which we add the specific logic and behaviorof our application.

  • When developing a Windows application, the Document/View model comes in handy. The application is divided into a document object that holds the data and performs the logic, and one or more views that take care of user input and display information on the screen.

  • When an event occurs (the user clicks the mouse, the window is resized) a message is sent to the application, it is caught by a view object and is passed on to the document object. There are hundreds of messages in the Windows system. However, we only catch those that interest us.

  • The device context can be viewed both as a canvas...