尘
尘莽
Unregistered / Unconfirmed
GUEST, unregistred user!
unit Grids;
.........
procedure TInplaceEditList.PaintWindow(DC: HDC);
var
R: TRect;
Flags: Integer;
W, X, Y: Integer;
begin
................
X := R.Left + ((R.Right - R.Left) shr 1) - 1 + Ord(Pressed);
Y := R.Top + ((R.Bottom - R.Top) shr 1) - 1 + Ord(Pressed);
................
end;
其中这两行可以精简为:
X := ((R.Right + R.Left) shr 1) - 1 + Ord(Pressed);
Y := ((R.Bottom + R.Top) shr 1) - 1 + Ord(Pressed);
.........
procedure TInplaceEditList.PaintWindow(DC: HDC);
var
R: TRect;
Flags: Integer;
W, X, Y: Integer;
begin
................
X := R.Left + ((R.Right - R.Left) shr 1) - 1 + Ord(Pressed);
Y := R.Top + ((R.Bottom - R.Top) shr 1) - 1 + Ord(Pressed);
................
end;
其中这两行可以精简为:
X := ((R.Right + R.Left) shr 1) - 1 + Ord(Pressed);
Y := ((R.Bottom + R.Top) shr 1) - 1 + Ord(Pressed);