   WM_PAINT makes slow screen refresh
  If I create a win32 program and have:LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam){switch(msg){case WM_CLOSE:DestroyWindow(hwnd);break;case WM_DESTROY:PostQuitMessage(0);break;case WM_PAINT:break;default:return DefWindowProc(hwnd, msg, wParam, lParam);}return 0;}The screen refreshes slower than if I remove case WM_PAINT:break;I tested it several times by dragging a blank window around the screen. With WM_PAINT in there, it made a trail. Without it, it moved smoothly.So I had a question. Is there a better way to track whether your window needs to be redrawn?   
  The reason your windows not moving slowly is that you return 0 for WM_PAINT, which tells windows that you've handled the case. But you haven't called BeginPaint() and EndPaint(), and you haven't actually redrawn the window.;  Evil Steve is right.You could use BeginPaint() and EndPaint() or just call ValidateRect() before break;   