/* restarts the process */ BOOL Process::Restart() { if (hProcess == nullptr) return FALSE; /* Call 'process is restarting' */ OnRestart(); /* remembers the command line */ DWORD iLen = strlen(szCmdLine), _id = id; TCHAR * buffer = new TCHAR[iLen + 1]; strcpy_s(buffer, iLen + 1, szCmdLine); /* destroy current process */ Destroy(); /* if we have the command line, create new process */ if (iLen){ /* create new process (using command line) */ Create(buffer); /* re-registration of 'exit' callback */ RegisterExitCallback(exitCallback); return TRUE; } delete[] buffer; return FALSE; }
// Handles left click on endgame screen void CApp::VictoryClick(int mX, int mY) { if(mY > 406 && mY < 459 && mX > 210 && mX < 404) { GameState = GAME_STATE_RUNNING; CurrentPlayer = 0; OnRestart(); } if(mY > 492 && mY < 548 && mX > 210 && mX < 404) { GameState = GAME_STATE_MENU; CurrentPlayer = 0; OnRestart(); } }
void BaseFeatureLayer::OnRefresh(INode* sender, TapGestureEventArg& e) { RETURN_IF_EMPTY(mLayers); OnRestart(); }