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

The WordDocument class

The WordDocument class is the main class of the application. It extends the StandardDocument class and takes advantage of its document-based functionality.

WordDocument.h

class WordDocument : public StandardDocument { 
  public: 
    WordDocument(WindowShow windowShow); 

The InitDocument class is called by the constructor, the ClearDocument, and Delete classes.

    void InitDocument(); 

The OnKeyboardMode method is called every time the user presses the Insert key. The UpdateCaret method sets the caret to a vertical bar in insert mode and a block in overwrite mode. When the user marks one or several characters, the caret is cleared.

    void OnKeyboardMode(KeyboardMode keyboardMode); 
    void UpdateCaret(); 

When the user presses, moves, and releases ...

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