Typically a Win32 render loop will have a trivial paint for those cases where the rendering isn't started or is halted for some reason (so you at least can't see 'junk' behind your window).
{
case WM_PAINT:
{
PAINTSTRUCT ps;
(void)BeginPaint(hWnd, &ps);
EndPaint(hWnd, &ps);
}
break;
...
}
return DefWindowProc(hWnd, message, wParam, lParam);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…