mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-08 12:58:25 +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;
|
ParentHandle: THandle;
|
||||||
// WindowInfo: PWindowInfo;
|
// WindowInfo: PWindowInfo;
|
||||||
begin
|
begin
|
||||||
Result:=false;
|
Result:=False;
|
||||||
// WindowInfo := GetWindowInfo(Handle);
|
// WindowInfo := GetWindowInfo(Handle);
|
||||||
// if (WindowInfo^.WinControl is TCustomFloatSpinEdit) then
|
// if (WindowInfo^.WinControl is TCustomFloatSpinEdit) then
|
||||||
// Handle := Windows.SendMessage(Handle, UDM_GETBUDDY, 0, 0);
|
// 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.X:=R.Left;
|
||||||
LeftTop.Y:=R.Top;
|
LeftTop.Y:=R.Top;
|
||||||
ParentHandle:=Windows.GetParent(Handle);
|
if (GetWindowLong(Handle, GWL_STYLE) and WS_CHILD) <> 0 then
|
||||||
if ParentHandle<>0 then
|
|
||||||
begin
|
begin
|
||||||
if not Windows.ScreenToClient(ParentHandle,@LeftTop) then exit;
|
ParentHandle:=Windows.GetParent(Handle);
|
||||||
if not GetLCLClientBoundsOffset(ParentHandle, R) then
|
if ParentHandle<>0 then
|
||||||
exit;
|
begin
|
||||||
dec(LeftTop.X, R.Left);
|
if not Windows.ScreenToClient(ParentHandle,@LeftTop) then Exit;
|
||||||
dec(LeftTop.Y, R.Top);
|
if not GetLCLClientBoundsOffset(ParentHandle, R) then
|
||||||
|
Exit;
|
||||||
|
Dec(LeftTop.X, R.Left);
|
||||||
|
Dec(LeftTop.Y, R.Top);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
Left:=LeftTop.X;
|
Left:=LeftTop.X;
|
||||||
Top:=LeftTop.Y;
|
Top:=LeftTop.Y;
|
||||||
Result:=true;
|
Result:=True;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user