Microsoft Foundation Classes (mfc.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
CDC::GetPixel
CDC                                         Up Contents Index Back
──Microsoft Foundation Classes──────────────────────────────────────────────
 
  DWORD GetPixel( int x, int y ) const;
  DWORD GetPixel( POINT point ) const;
 
  Parameter   Description
 
  <x>         Specifies the logical x-coordinate of the point to be
              examined.
 
  <y>         Specifies the logical y-coordinate of the point to be
              examined.
 
  <point>     Specifies the logical x- and y-coordinates of the point to
              be examined.
 
  Remarks
 
  Retrieves the RGB color value of the pixel at the point specified by <x>
  and <y>. The point must be in the clipping region. If the point is not
  in the clipping region, the function has no effect and returns -1.
 
  Not all devices support the GetPixel function. For more information, see
  the RC_BITBLT raster capability under the GetDeviceCaps member
  function.
 
  The GetPixel member function has two forms. The first takes two
  coordinate values; the second takes either a POINT structure or a
  CPoint object.
 
  Return Value
 
  For either version of the function, an RGB color value for the color of
  the given point. It is -1 if the coordinates do not specify a point in
  the clipping region.
 
  See Also
 
  CDC::GetDeviceCaps, CDC::SetPixel, ::GetPixel
 
 
                                     -♦-