Re: [Lazarus] Qt Ws doesn't support properly GetWindowSize() and GetWindowRect()

2017-12-15 Thread Giuliano Colla via Lazarus
Il 15/12/2017 18:30, zeljko ha scritto: It's bug in your code (range error). You're using aHandle: System.THandle (longint) instead of LCLIntf.THandle which is of ptruint type. Best and correct usage would be to use HWND type which is what it needs to be on all platforms and widgetsets. When aH

Re: [Lazarus] Qt Ws doesn't support properly GetWindowSize() and GetWindowRect()

2017-12-15 Thread zeljko via Lazarus
On 15.12.2017 17:08, Giuliano Colla via Lazarus wrote: This snippet of code, which executes as expected with GTK2 WS, fails with QT WS: procedure TForm1.btnWsizeClick(Sender: TObject); var  aHandle: THandle;    aWidth,aHeight: Integer;    aRect: TRect; begin    aHandle:= Form1.Handle;    if Ge

Re: [Lazarus] Qt Ws doesn't support properly GetWindowSize() and GetWindowRect()

2017-12-15 Thread zeljko via Lazarus
On 15.12.2017 17:08, Giuliano Colla via Lazarus wrote: This snippet of code, which executes as expected with GTK2 WS, fails with QT WS: procedure TForm1.btnWsizeClick(Sender: TObject); var  aHandle: THandle;    aWidth,aHeight: Integer;    aRect: TRect; begin    aHandle:= Form1.Handle;    if Ge

[Lazarus] Qt Ws doesn't support properly GetWindowSize() and GetWindowRect()

2017-12-15 Thread Giuliano Colla via Lazarus
This snippet of code, which executes as expected with GTK2 WS, fails with QT WS: procedure TForm1.btnWsizeClick(Sender: TObject); var  aHandle: THandle;   aWidth,aHeight: Integer;   aRect: TRect; begin   aHandle:= Form1.Handle;   if GetWindowSize(aHandle,aWidth,aHeight) then begin     Labe