1,183
社区成员
发帖
与我相关
我的任务
分享
var
CurPos: TPoint;
ADC: HDC;
ARect: TRect;
begin
GetCursorPos(CurPos);
ADC := GetWindowDC(Self.Handle);
try
ARect := Rect(CurPos.x - Self.Left, CurPos.y - Self.Top, CurPos.x - Self.Left + 32, CurPos.y - Self.Top + 32);
InValidateRect(Self.Handle, @ARect, true);
DrawIconEx(ADC, ARect.Left, ARect.Top, FIcon, 32, 32, 0, 0, DI_NORMAL);
finally
ReleaseDC(Self.Handle, ADC);
end;
end;