mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 23:39:40 +02:00
LCL, Win32: cleanup, remove an unused function.
git-svn-id: trunk@47473 -
This commit is contained in:
parent
f0cc20daa2
commit
fa32f0d431
@ -250,13 +250,9 @@ begin
|
|||||||
for i:= 0 to c - 1 do
|
for i:= 0 to c - 1 do
|
||||||
begin
|
begin
|
||||||
sub := GetSubMenu(AParent, i);
|
sub := GetSubMenu(AParent, i);
|
||||||
if sub = ASearch
|
if sub = ASearch then
|
||||||
then begin
|
Exit(AParent);
|
||||||
Result := AParent;
|
Result := GetMenuParent(ASearch, sub); // Recursive call
|
||||||
Exit;
|
|
||||||
end;
|
|
||||||
|
|
||||||
Result := GetMenuParent(ASearch, sub);
|
|
||||||
if Result <> 0 then Exit;
|
if Result <> 0 then Exit;
|
||||||
end;
|
end;
|
||||||
Result := 0;
|
Result := 0;
|
||||||
@ -326,28 +322,11 @@ begin
|
|||||||
else
|
else
|
||||||
EnableWindow(ChildControl.Handle, false);
|
EnableWindow(ChildControl.Handle, false);
|
||||||
|
|
||||||
EnableChildWindows(ChildControl, Enable);
|
EnableChildWindows(ChildControl, Enable); // Recursive call
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// Gets the cursor position relative to a given window
|
|
||||||
function GetClientCursorPos(ClientWindow: HWND) : TSmallPoint;
|
|
||||||
var
|
|
||||||
P: TPoint;
|
|
||||||
begin
|
|
||||||
Windows.GetCursorPos(P);
|
|
||||||
//if the mouse is not over the window is better to set to 0 to avoid weird behaviors
|
|
||||||
if Windows.WindowFromPoint(P) = ClientWindow then
|
|
||||||
Windows.ScreenToClient(ClientWindow, P)
|
|
||||||
else
|
|
||||||
begin
|
|
||||||
P.X:=0;
|
|
||||||
P.Y:=0;
|
|
||||||
end;
|
|
||||||
Result := PointToSmallPoint(P);
|
|
||||||
end;
|
|
||||||
|
|
||||||
// A helper class for WindowProc to make it easier to split code into smaller pieces.
|
// A helper class for WindowProc to make it easier to split code into smaller pieces.
|
||||||
// The original function was about 2400 lines.
|
// The original function was about 2400 lines.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user