次の方法で共有


Gdi::SetPixel_I (Windows Embedded CE 6.0)

1/6/2010

This method sets the pixel at the specified coordinates to the specified color.

Syntax

static WINGDIAPI COLORREF WINAPI SetPixel_I(
  HDC hdc, 
  int X, 
  int Y, 
  COLORREF crColor
);

Parameters

  • hdc
    [in] Handle to the device context.
  • X
    [in] Integer that specifies the x-coordinate, in logical units, of the point to be set.
  • Y
    [in] Integer that specifies the y-coordinate, in logical units, of the point to be set.
  • crColor
    [in] COLORREF value that specifies the color to be used to paint the point.

Return Value

The RGB value that the function sets the pixel to indicates success.

This value can differ from the color specified by crColor; this difference occurs when an exact match for the specified color cannot be found.

–1 indicates failure.

To get extended error information, call GetLastError.

Remarks

This method is an internal version of the SetPixel function.

The method fails if the pixel coordinates lie outside of the current clipping region.

Not all devices support the Gdi::SetPixel_I method. For more information, see Gdi::GetDeviceCaps_I.

Requirements

Header gdi.hpp
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

Gdi
SetPixel
Gdi::GetDeviceCaps_I