i'm trying to make the screen refresh continuously while still
handling windows messages correctly. here's what i have:
#define MYMSG 19000
PostMessage(hWnd, MYMSG, 0, 0);
while (!bQuit)
{
if (PeekMessage (&msg, NULL, 0, 0, PM_REMOVE))
{
TranslateMessage (&msg);
DispatchMessage (&msg);
}
}
...
case MYMSG:
boardgraphics.drawboard(board);
SwapBuffers (hDC);
Sleep(10);
PostMessage(hWnd, MYMSG, 0, 0);
return 0;
my understanding is that it should post MYMSG at the end of the queue,
and that it will be read after any keyboard and mouse messages.
however, the window doesn't seem to be handling keyboard and mouse
messages.
any ideas?