mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-10 15:40:32 +02:00
win32: scroll fix from Martin Friebe (#0011768)
git-svn-id: trunk@16528 -
This commit is contained in:
parent
c93c466bc0
commit
5d8c7c393a
@ -166,6 +166,20 @@ var
|
||||
if not TWinControl(Sender).HandleAllocated then
|
||||
exit;
|
||||
|
||||
// why coords are client? - they must be screen
|
||||
with TLMMouseEvent(Message) do
|
||||
begin
|
||||
Pos.X := X;
|
||||
Pos.Y := Y;
|
||||
end;
|
||||
ClientToScreen(Handle, Pos);
|
||||
WParam := Windows.WParam(Longint(PointToSmallPoint(Pos)));
|
||||
with TLMMouseEvent(Message) do
|
||||
begin
|
||||
X := Pos.X;
|
||||
Y := Pos.Y;
|
||||
end;
|
||||
|
||||
with TLMessage(Message) do
|
||||
begin
|
||||
Result := CallDefaultWindowProc(Handle, Msg, WParam, LParam);
|
||||
@ -179,15 +193,6 @@ var
|
||||
ScrollInfo.fMask := SIF_PAGE or SIF_POS or SIF_RANGE;
|
||||
// if mouse is over horizontal scrollbar, scroll horizontally
|
||||
|
||||
// why coords are client? - they must be screen
|
||||
with TLMMouseEvent(Message) do
|
||||
begin
|
||||
Pos.X := X;
|
||||
Pos.Y := Y;
|
||||
end;
|
||||
ClientToScreen(Handle, Pos);
|
||||
WParam := Windows.WParam(Longint(PointToSmallPoint(Pos)));
|
||||
|
||||
if Windows.SendMessage(Handle, WM_NCHITTEST, 0, WParam) = HTHSCROLL then
|
||||
begin
|
||||
ScrollBar := SB_HORZ;
|
||||
@ -3428,3 +3433,4 @@ end;
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user