I am beginning to develop some easy 3D sport. The essential subject for a begin is the sport loop.
There’s a answer:
whereas (true)
{
whereas (PeekMessage(&msg,0,0,0,PM_REMOVE)
{
// Translate and dispatch message
}
if (msg.message == WM_QUIT)
{
break;
}
// Do replace, rendering and all the actual sport loop stuff
}
proposed by Syntac_ in this thread.
The above reply revived constructive suggestions WHILE the answer appears to NOT be legitimate!
Once I click on on the shut (‘X’) button (or simply press ALt+F4) to shut the principle app window nothing occurs – the app remains to be operating! Quick investigation – the issue is that the app receives some further WM_TIMER message after the WM_QUIT message so the if (msg.message == WM_QUIT)
is NEVER reached!