mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-18 07:29:30 +02:00
lcl: wince: aligns WinCE to Win32 from LacaK
This commit is contained in:
parent
fba36b9318
commit
819e17fc38
@ -2120,25 +2120,28 @@ var
|
||||
ParentHandle: THandle;
|
||||
// WindowInfo: PWindowInfo;
|
||||
begin
|
||||
Result:=false;
|
||||
Result:=False;
|
||||
// WindowInfo := GetWindowInfo(Handle);
|
||||
// if (WindowInfo^.WinControl is TCustomFloatSpinEdit) then
|
||||
// Handle := Windows.SendMessage(Handle, UDM_GETBUDDY, 0, 0);
|
||||
if not Windows.GetWindowRect(Handle,@R) then exit;
|
||||
if not Windows.GetWindowRect(Handle,@R) then Exit;
|
||||
LeftTop.X:=R.Left;
|
||||
LeftTop.Y:=R.Top;
|
||||
ParentHandle:=Windows.GetParent(Handle);
|
||||
if ParentHandle<>0 then
|
||||
if (GetWindowLong(Handle, GWL_STYLE) and WS_CHILD) <> 0 then
|
||||
begin
|
||||
if not Windows.ScreenToClient(ParentHandle,@LeftTop) then exit;
|
||||
if not GetLCLClientBoundsOffset(ParentHandle, R) then
|
||||
exit;
|
||||
dec(LeftTop.X, R.Left);
|
||||
dec(LeftTop.Y, R.Top);
|
||||
ParentHandle:=Windows.GetParent(Handle);
|
||||
if ParentHandle<>0 then
|
||||
begin
|
||||
if not Windows.ScreenToClient(ParentHandle,@LeftTop) then Exit;
|
||||
if not GetLCLClientBoundsOffset(ParentHandle, R) then
|
||||
Exit;
|
||||
Dec(LeftTop.X, R.Left);
|
||||
Dec(LeftTop.Y, R.Top);
|
||||
end;
|
||||
end;
|
||||
Left:=LeftTop.X;
|
||||
Top:=LeftTop.Y;
|
||||
Result:=true;
|
||||
Result:=True;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user