|
FPointRec.TopMid.Parent:=PointParent;
FPointRec.RightMid.Parent:=PointParent;
FPointRec.ButtonMid.Parent:=PointParent;
end;
//得到当前活动窗口
procedure TDragClass.SetCurActiveCon(curCon: Pointer);
var i:integer;
begin
for i:=0 to FConList.Count-1 do
if Integer(curCon)=Integer(FConList.Items[i]) then
begin
FCurActiveCon:=i;
break;
end;
end;
//----------------------------------
//八个小点的处理消息
procedure TDragClass.PointMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
if Button= mbLeft then
begin
moveX:=0; moveY:=0;
if Sender=FPointRec.LeftTop then
begin
FpointRec.LeftTop.isDown:=True;
GetCursorPos(FPointRec.LeftTop.PrevP);
end
else if Sender=FPointRec.RightTop then
begin
FpointRec.RightTop.isDown:=True;
GetCursorPos(FPointRec.RightTop.PrevP);
end
else if Sender=FPointRec.LeftBottom then
begin
FpointRec.LeftBottom.isDown:=True;
GetCursorPos(FPointRec.LeftBottom.PrevP);
end
else if Sender=FPointRec.RightButton then
begin
FpointRec.RightButton.isDown:=True;
GetCursorPos(FPointRec.RightButton.PrevP);
end
else if Sender=FPointRec.LeftMid then
begin
FpointRec.LeftMid.isDown:=True;
GetCursorPos(FPointRec.LeftMid.PrevP);
end
else if Sender=FPointRec.TopMid then
begin
FpointRec.TopMid.isDown:=True;
GetCursorPos(FPointRec.TopMid.PrevP);
end
else if Sender=FPointRec.RightMid then
begin
FpointRec.RightMid.isDown:=True;
GetCursorPos(FPointRec.RightMid.PrevP);
end
else if Sender=FPointRec.ButtonMid then
begin
FpointRec.ButtonMid.isDown:=True;
GetCursorPos(FPointRec.ButtonMid.PrevP);
end;
end;
end;
procedure TDragClass.PointMouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
begin
if Shift=[ssLeft] then
begin
if FPointRec.LeftTop.isDown then
begin
MoveLeftTopPoint;
reSizeCon
end
else if FPointRec.LeftBottom.isDown then
begin
MoveLeftBottomPoint;
reSizeCon
end
else if FPointRec.RightTop.isDown then
上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] ... 下一页 >> 没有相关教程
|