[Lazarus] GetWindowSize misleading documentation or bug?

Giuliano Colla giuliano.colla at fastwebnet.it
Fri Sep 26 20:47:52 CEST 2014


Il 26/09/2014 19:32, Giuliano Colla ha scritto:
>
> Il 26/09/2014 13:03, Luca Olivetti ha scritto:
>> I was looking for a (hopefullyuuuuu) cross platform way to know the
>> whole size of a window, including its decoration and I found this:
>>
>> http://lazarus-ccr.sourceforge.net/docs/lcl/lclintf/getwindowsize.html
>>
>> the documentation on that page reflect what I see on the tooltip in
>> lazarus (1.2.4), *but* the implementation (at least win32) actually
>> removes the size of the borders and the caption.
>> Is the documentation wrong or is it a bug?
>> Btw: GetWindowRect returns the whole size in windows but not with gtk2.
>
> AFAIK getting the whole size of a window, decorations included, in a 
> general way, is almost hopeless.
>

I was too hasty in my reply. After some tests here are the results:

GetWindowSize returns the window client area in all platforms.

GetWindowRect here returns the full window area (decoration and borders 
included) in all the configurations tested:

Windows XP running in a VM under Linux, with Lazarus 1.2.4
Linux CentOs 6, Gtk2 and Qt, desktop KDE and XFce, Lazarus 1.2.2 and 
Lazarus 1.3 (trunk)

Apparently the documentation isn't accurate, and there's a mix-up of the 
two functions

Giuliano

-- 
Giuliano Colla

Project planning question: when it's 90% done, are we halfway or not yet?





More information about the Lazarus mailing list