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

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); 
} 
主站蜘蛛池模板: 新津县| 紫阳县| 苏州市| 蒙阴县| 曲周县| 武宁县| 兴安盟| 志丹县| 乌恰县| 尤溪县| 临漳县| 望都县| 江孜县| 潮州市| 运城市| 鹤壁市| 乌拉特后旗| 萨嘎县| 贵港市| 大兴区| 宁乡县| 尚义县| 女性| 大方县| 清远市| 石屏县| 大新县| 东乡| 晋中市| 育儿| 海伦市| 阿图什市| 凉山| 河北省| 保靖县| 镇赉县| 永春县| 剑川县| 广丰县| 和龙市| 鄂托克旗|