官术网_书友最值得收藏!

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("Tetris"); 
  Application::MainWindowPtr() = new TetrisWindow(windowShow); 
} 
主站蜘蛛池模板: 东宁县| 东港市| 襄垣县| 夏邑县| 堆龙德庆县| 长乐市| 泗水县| 峡江县| 平陆县| 宁海县| 昌黎县| 类乌齐县| 南开区| 潼关县| 丽江市| 安乡县| 克东县| 榆中县| 潮州市| 桐乡市| 南郑县| 蓬安县| 蓬莱市| 峨边| 聊城市| 台湾省| 五华县| 丹凤县| 闽侯县| 白玉县| 山丹县| 孝昌县| 元江| 牙克石市| 吉木萨尔县| 胶南市| 黄石市| 凤凰县| 江达县| 措勤县| 张掖市|