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 ...

Get C++ Windows Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.