Within a WM_PAINT, you have to draw to the DC returned
by BeginPaint().

Code:
case WM_PAINT:{
		PAINTSTRUCT ps;
                HDC myDC = BeginPaint(hWnd, &ps);

                // do whatever
                // cleanup
                EndPaint(hWnd, &ps);
                return(0);
}