- C++ Windows Programming
- Stefan Bj?rnander
- 119字
- 2021-07-14 10:03:18
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); }
推薦閱讀
- 復雜軟件設計之道:領域驅動設計全面解析與實戰
- 軟件測試項目實戰之性能測試篇
- 從0到1:HTML+CSS快速上手
- Instant Nancy Web Development
- Extreme C
- Hands-On Nuxt.js Web Development
- Julia 1.0 Programming Complete Reference Guide
- Django 3.0入門與實踐
- HTML5+CSS3+jQuery Mobile APP與移動網站設計從入門到精通
- 軟件工程基礎與實訓教程
- 監控的藝術:云原生時代的監控框架
- H5+移動營銷設計寶典
- Offer來了:Java面試核心知識點精講(框架篇)
- Hands-On ROS for Robotics Programming
- Microsoft Azure Security