The MainWindow class

The MainWindow class is nearly identical to the versions of the previous chapters. It sets the application name to Word and returns the address of a WordDocument instance:

#include "..\\SmallWindows\\SmallWindows.h" 
#include "CharInfo.h" 
#include "LineInfo.h" 
#include "Paragraph.h" 
#include "WordDocument.h" 
 
void MainWindow(vector<String> /* argumentList */, 
                WindowShow windowShow) { 
  Application::ApplicationName() = TEXT("Word"); 
  Application::MainWindowPtr() = new WordDocument(windowShow); 
} 

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.