-
Win32 PONG problem!
OK, I am doing a Windows PONG and I have a problem. I need to make 2 diff. colored buttons. When I send the WM_PAINT message, my program won't draw the ball. What do I do?
[EDIT] = REQUESTED CODE:
case WM_PAINT:
HDC r;
RECT rr;
r = GetDC (red);
GetClientRect(red, &rr);
FillRect (r, &rr, CreateSolidBrush (RGB (255, 0, 0) ));
ReleaseDC(red, r);
break;
[/EDIT]
-
you're just refilling the screen with red aren't you? how about you redraw the ball aswell?
by the way, you should use BeginPaint and EndPaint when handling the WM_PAINT message.. not GetDC and ReleaseDC
U.