O'Reilly logo

C++ Windows Programming by Stefan Björnander

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 7. Keyboard Input and Character Calculation

In this chapter, we will continue our work on the word processor from Chapter 6, Building a Word Processor. More specifically, we will look into keyboard input and character calculation. The keyboard handling section deals with regular character input and a rather large set of special keys, such as Home, End, Page Up and Page Down, Return, Backspace, and arrows.

The calculation section deals with the calculation of each character with regards to its font and the alignment of its paragraph as well as the page settings. In the end, we will calculate the position and size of each individual character in the document.

Keyboard handling

To begin with, we look into the input of regular characters. The ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required