Some pseudo code of what your WM_PAINT event handler would look like:
Code:
HDC hdc, hdcMem;
HBITMAP hbmMem;
HANDLE hOld;
hdc = BeginPaint(hwnd,&ps);
/* Create an off-screen DC for double-buffering */
hdcMem = CreateCompatibleDC(hdc);
hbmMem = CreateCompatibleBitmap(hdc, width, height);
hOld = SelectObject(hdcMem, hbmMem);
FillRect(hdcMem,&rClient,(HBRUSH)COLOR_WINDOW);
/* Transfer the off-screen DC to the screen */
BitBlt(hdc, 0, 0, width, height, hdcMem, 0, 0, SRCCOPY);
/* Free-up the off-screen DC */
SelectObject(hdcMem, hOld);
DeleteObject(hbmMem);
DeleteDC(hdcMem);
EndPaint(hwnd,&ps);
Change the FillRect() HBRUSH value to the color you want. You can use CreateSolidBrush() to create a brush with the color value you want.