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

Giuliano Colla giuliano.colla at fastwebnet.it
Fri Dec 15 19:07:41 CET 2017


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 aHandle type is corrected, or LCLType is included with it's 
> THandle then everything works as expected.
> Don't ask me my gtk2 works, in any case it's wrong on 64bit platform. 


Thanks a lot. With the proper type of aHandle it works fine both with Qt 
and GTk2.

Maybe it was working with gtk2 because there's an additional check on 
handle validity but I didn't investigate further. A bug of mine is a bug 
of mine.

Giuliano




More information about the Lazarus mailing list