Share via


Gdi::GetNearestColor_I (Windows CE 5.0)

Send Feedback

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

static WINGDIAPI COLORREF WINAPI GetNearestColor_I(HDChdc, COLORREFcrColor);

Parameters

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

Return Values

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

OS Versions: Windows CE .NET 4.0 and later.
Header: Gdi.hpp.

See Also

Gdi | GetNearestColor | Gdi::GetDeviceCaps_I | COLORREF

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.