本文整理汇总了C++中MyApp::Shutdown方法的典型用法代码示例。如果您正苦于以下问题:C++ MyApp::Shutdown方法的具体用法?C++ MyApp::Shutdown怎么用?C++ MyApp::Shutdown使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MyApp
的用法示例。
在下文中一共展示了MyApp::Shutdown方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: _tWinMain
//.........这里部分代码省略.........
SetupEngineUtil setupEngine;
CConsole console(APP_TITLE);
console.setTopLeft(0,0);
MyApp app;
#if 0
vector2d<int> resolution(800,600);
vector2d<int> topLeftCorner(800,450);
#else
//vector2d<int> resolution(1024,768);
vector2d<int> resolution(1400,900);
vector2d<int> topLeftCorner(0,0);
#endif
GetMessage(&msg, NULL, 0, 0);
{
MyAppWindow appWindow( &app, msg.hwnd );
appWindow.bringToFront();
appWindow.setTopLeft( topLeftCorner.x, topLeftCorner.y );
g_pMainWindow = &appWindow;
app.PreInit_CreateViewports( &appWindow );
GameTimer timer;
UNDONE;
if( !app.Initialize(MXC("???")) ) {
return -1;
}
// Main message loop:
while( true )
{
BOOL bPendingMsg = FALSE;
//if( appWindow.isActive() )
{
bPendingMsg = ::PeekMessage( &msg, NULL, 0, 0, PM_REMOVE );
}
//else
//{
// bPendingMsg = ::GetMessage( &msg, NULL, 0, 0 );
//}
if( msg.message == WM_QUIT )
{
break;
}
//if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg))
//{
// TranslateMessage(&msg);
// DispatchMessage(&msg);
//}
if( bPendingMsg )
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
const F4 deltaSeconds = timer.TickFrame();
appWindow.Tick( deltaSeconds );
appWindow.Draw();
MX_PROFILE_INCREMENT_FRAME_COUNTER;
mxSleepMilliseconds(1);
}
app.Shutdown();
}
return (int) msg.wParam;
}