应该没有,我来写一下吧,不知道对不对:
function inrange(p:point,r:rect):boolean;
begin
result:=(p.x>=r.left) and (p.y>=r.top) and (p.x<=r.right) and (p.y<r.bottom);
end;
function inrange(p:point,r:rect):boolean;
begin
result:=(p.x>=r.left) and (p.y>=r.top) and (p.x<=r.right) and (p.y<r.bottom);
end;
{$EXTERNALSYM PtInRect}
function PtInRect(const lprc: TRect; pt: TPoint): BOOL; stdcall;
procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
begin
if PtInRect(Rect(10, 10, 100, 100), Point(X, Y)) then
Canvas.Pixels[X, Y] := clRed;
end;