Skip to content

Latest commit

 

History

History
46 lines (32 loc) · 1 KB

File metadata and controls

46 lines (32 loc) · 1 KB

Home

Function name : GetNearestColor

Group: Color - Library: gdi32


The GetNearestColor function returns a color value identifying a color from the system palette that will be displayed when the specified color value is used


Code examples:

Using GetNearestColor

Declaration:

COLORREF GetNearestColor(
	HDC  hdc,	// handle of device context
	COLORREF  crColor 	// color to be matched
);  

FoxPro declaration:

DECLARE INTEGER GetNearestColor IN "gdi32";
	INTEGER hdc,;
	INTEGER crColor  

Parameters:

hdc Identifies the device context.

crColor Specifies a color value that identifies a requested color


Return value:

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