// Main message loop
MSG msg;
ZeroMemory( &msg, sizeof( msg ) );
while(msg.message!=WM_QUIT)
{
if(PeekMessage( &msg, NULL, 0U, 0U, PM_REMOVE ) )
{
TranslateMessage( &msg );
DispatchMessage( &msg );
}
else
{
Render();
}
}
The “render” function hasn’t been executing
The
PeekMessagedocumentation says this regarding the return value:When the message queue is empty, it will indeed return zero, i.e.
FALSE. The conclusion therefore is that the message queue is never empty. And the most likely explanation for that is that one of the messages you handle inDispatchMessageleads to that same message being posted to the queue.