The MainWindow function
The MainWindow
function is similar to the methods in Chapter 2, Hello, Small World!. It sets the application name and returns a pointer to the main window, which, in this case, is an instance of the TetrisWindow
class. As stated in Chapter 2, Hello, Small World! the application name is used when accessing the registry, when opening or saving a file, and by the About menu item. However, none of that functionality is used in this application:
MainWindow.cpp
#include "..\\SmallWindows\\SmallWindows.h" #include "GameGrid.h" #include "TetrisFigure.h" #include "RedFigure.h" #include "BrownFigure.h" #include "TurquoiseFigure.h" #include "GreenFigure.h" #include "YellowFigure.h" #include "BlueFigure.h" #include "PurpleFigure.h" #include "TetrisWindow.h" void MainWindow(vector<String> /* argumentList */, WindowShow windowShow) { Application::ApplicationName() = TEXT...