My SwapBuffers() function now looks like this:
I clear the buffer in the WM_PAINT case after blitting to ps.hdc. Guess I don't need the UpdateWindow in there, huh? I just tried it without & it works the same.
InvalidateRgn(hwnd, NULL, false);
But fill me in on the message pump idea. My message pump looks like this:
I've tried out a number of different message pumps, and when they work they all lead to the same result. The one above used to work but maybe I need to do something different to handle all the paint messages?
if (PeekMessage(&msg, 0, 0, 0, PM_NOREMOVE))
int result = GetMessage(&msg, 0, 0, 0);