LCL-Win32: Improve OverlayWindowProc. Patch from Maciej Izak.

git-svn-id: trunk@48519 -
This commit is contained in:
juha 2015-03-27 09:14:44 +00:00
parent 59f17ee5c6
commit 094ca7530a

View File

@ -2644,6 +2644,7 @@ var
Owner: TWinControl;
Control: TControl;
P: TPoint;
LRect: Windows.RECT;
begin
case Msg of
WM_ERASEBKGND:
@ -2689,6 +2690,15 @@ begin
DisposeWindowInfo(Window);
Result := 0;
end;
WM_MOVE:
begin
if (Int16(LoWord(LParam)) <> 0) or (Int16(HiWord(LParam)) <> 0) then
begin
Parent := Windows.GetParent(Window);
Windows.GetClientRect(Parent, LRect);
Windows.SetWindowPos(Window, HWND_TOP, 0, 0, LRect.Right, LRect.Bottom, 0);
end;
end;
else
if UnicodeEnabledOS
then Result := Windows.DefWindowProcW(Window, Msg, WParam, LParam)