CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Guest

    Getting Color of a Pixel or Region

    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



  2. #2
    Guest

    Re: Getting Color of a Pixel or Region

    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



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured