I am trying to paint my own form by using the following code:
case WM_PAINT:
hDC = BeginPaint(hWnd, &ps);
hBrush = CreateSolidBrush(RGB(255,0,0));
FillRect(hDC, &ps.rcPaint, hBrush);
EndPaint(hWnd, &ps);
break;
My problem is, that when you resize the form or drag it around, you can still see it flash grey between paints....
Is there a way to interrupt the regular painting routine so that I can paint it myself seamlessly?