(Qt): changes in GetWindowRelativePosition (now GetBounds is right after form loading)

git-svn-id: trunk@11678 -
This commit is contained in:
paul 2007-07-30 16:36:30 +00:00
parent dd8ccf2773
commit d476d654ea

View File

@ -3144,38 +3144,16 @@ end;
------------------------------------------------------------------------------}
function TQtWidgetSet.GetWindowRelativePosition(Handle: HWND; var Left, Top: integer): boolean;
var
//LeftTop:TPoint;
R: TRect;
//ParentHandle: THandle;
//WindowInfo: PWindowInfo;
begin
{$ifdef VerboseQtWinAPI}
WriteLn('[WinAPI GetWindowRelativePosition]');
{$endif}
QWidget_geometry(TQtMainWindow(Handle).Widget, @R);
R := TQtWidget(Handle).getFrameGeometry;
Left := R.Left;
Top := R.Top;
Result := True;
{ 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;
LeftTop.X:=R.Left;
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;
Left:=LeftTop.X;
Top:=LeftTop.Y;
Result := True;}
end;
{------------------------------------------------------------------------------