Share via


Gdi::GetNearestColor_I (Windows Embedded CE 6.0)

1/6/2010

This method returns the system palette color that will be displayed when the specified color value is used.

Syntax

static WINGDIAPI COLORREF WINAPI GetNearestColor_I(
  HDC hdc, 
  COLORREF crColor
);

Parameters

  • hdc
    [in] Handle to the device context.
  • crColor
    [in] COLORREF value that specifies a requested color.

Return Value

If the function succeeds, the return value identifies a color from the system palette that corresponds to the specified color value.

If the function fails, the return value is CLR_INVALID.

To get extended error information, call GetLastError.

Remarks

This method is an internal version of the GetNearestColor function.

The Gdi::GetNearestColor_I method returns the color from the selected device context that most closely matches the specified color value.

Requirements

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

See Also

Reference

Gdi
GetNearestColor
Gdi::GetDeviceCaps_I
COLORREF