Click to See Complete Forum and Search --> : Getting Color of a Pixel or Region


May 9th, 1999, 12:14 PM
Hi.

Using CRgn functions, i'm able to paint a Region using a CBrush object into a CDC Window.
Ok..
now

how the hell do i get the color of a region or pixel??

I need to know what's the function to get the color of a pixel, using Point Coordinates, or a Region or Clipped Region.

Thanks
Kitai, just setting his account now

May 9th, 1999, 01:52 PM
Well, regarding color at a pixel, you should be able to use CDC method GetPixel(POINT pnt) (or the Win32 ::GetPixel(HDC, int, int)). This returns a COLORREF, check the docs on that struct.

/Rob