==================================================================
function foGetColorAtMousePoint( oWinControl : TWinControl;
X, Y : integer) : TColor;
var
DC : HDC;
oCanvas : TCanvas;
oColor : TColor;
begin
DC := GetDC(oWinControl.Handle);
oCanvas := TCanvas.Create();
마우스 포인터 위치의 컬러 리턴하는 함수입니다.
참고하세요.
==================================================================
function foGetColorAtMousePoint( oWinControl : TWinControl;
X, Y : integer) : TColor;
var
DC : HDC;
oCanvas : TCanvas;
oColor : TColor;
begin
DC := GetDC(oWinControl.Handle);
oCanvas := TCanvas.Create();
try
oCanvas.Handle := DC;
oColor := oCanvas.Pixels[X, Y];
finally
oCanvas.Free();
ReleaseDC(oWinControl.Handle, DC);
end;
Result := oColor;
end;