CDC::GetPixel() returns a -1 as if the pixel is not in clip region
CClientDC dc( this );
COLORREF color = dc.GetPixel( point );
>CDC::GetPixel() and SetPixel return a -1 as if the pixel is not in clip
>region instead of the COLORREF color in a CView drived class OnDraw
>function. CDC::GetClipBox returns an empty rectangle.
>CWnd::InvalidateRect is called in the function that sends the WM_PAINT
>message which causes the OnDraw function to be called. Whether the
>rectangle given to InvalidateRect is NULL which should invalidate the
>whole window or the window client rectangle is used the GetClipBox
>rectangle is still empty. According to the documentation BeginPaint
>should create a device context that creates the appropiate clipping
>region. CView::OnPaint uses CPaintDC which calls BeginPaint. The
>background is not erased since this is only a partial redraw. I would
>like to be able to determine the color of a given pixel without
>redrawing the whole window.