mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-22 20:39:25 +02:00
win32: fix regression from r50513 #bd6984dbfd. Issue #26086
git-svn-id: trunk@50526 -
This commit is contained in:
parent
72b8d27401
commit
c87a82364e
@ -587,15 +587,19 @@ begin
|
|||||||
SWP_NOSIZE or SWP_NOMOVE or SWP_NOZORDER or SWP_NOACTIVATE or VisibilityToFlag[AWinControl.HandleObjectShouldBeVisible])
|
SWP_NOSIZE or SWP_NOMOVE or SWP_NOZORDER or SWP_NOACTIVATE or VisibilityToFlag[AWinControl.HandleObjectShouldBeVisible])
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function ScrollWindowPtr(hWnd: HWND; dx: longint; dy: longint;
|
|
||||||
prcScroll: pointer; prcClip: pointer; hrgnUpdate: HRGN; prcUpdate: LPRECT;
|
|
||||||
flags: UINT): WINBOOL; stdcall; external 'user32' name 'ScrollWindowEx';
|
|
||||||
|
|
||||||
class procedure TWin32WSWinControl.ScrollBy(const AWinControl: TWinControl;
|
class procedure TWin32WSWinControl.ScrollBy(const AWinControl: TWinControl;
|
||||||
DeltaX, DeltaY: integer);
|
DeltaX, DeltaY: integer);
|
||||||
|
var
|
||||||
|
ScrollArea, ClipArea: TRect;
|
||||||
|
ScrollFlags: Integer;
|
||||||
begin
|
begin
|
||||||
if Windows.IsWindowVisible(AWinControl.Handle) then
|
if Windows.IsWindowVisible(AWinControl.Handle) then
|
||||||
ScrollWindowPtr(AWinControl.Handle, DeltaX, DeltaY, nil, nil, 0, nil, 0);
|
begin
|
||||||
|
ScrollArea := AWinControl.ClientRect; // the whole area -> client rect
|
||||||
|
ClipArea := AWinControl.ClientRect; // the scroll area without fixed items (e.g. the header row in grids etc.) - currently not supported by the LCL
|
||||||
|
ScrollFlags := SW_INVALIDATE or SW_ERASE;
|
||||||
|
ScrollWindowEx(AWinControl.Handle, DeltaX, DeltaY, @ScrollArea, @ClipArea, 0, nil, ScrollFlags);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TWin32WSDragImageList }
|
{ TWin32WSDragImageList }
|
||||||
|
Loading…
Reference in New Issue
Block a user