[lazarus] Bug in lcl resizing code and patch for win32

Micha Nelissen mdvpost at hotmail.com
Sat Jun 28 15:41:29 EDT 2003


Mattias Gaertner wrote:
> On Sat, 28 Jun 2003 21:45:04 +0200
> "Micha Nelissen" <mdvpost at hotmail.com> wrote:
>
>> Karl Brandt wrote:
>>> Micha Nelissen wrote:
>>>
>>>> Karl Brandt wrote:
>>>>
>>>>
>>>>> Sometime ago i sent a patch fixing the forms sizes under win32 and
>>>>> got surprised to see that things were messed.
>>>>> So i  did the  job again!
>>>>>
>>>>> Attached is a patch that makes the form sizes correct.
>>>>>
>>>>>
>>>>
>>>> What was wrong? Those messages should send the same information as
>>>> you retrieve via GetClientRect/GetWindowRect.
>>>>
>>>>
>>> In LCL, WindowSize = ClientSize while windows and VCL expect/returns
>>> diferent sizes, so is needed  some adjustments.
>>
>> That does not explain the WM_MOVE change. The WM_SIZE is defined as
>> such:
>>
>> nWidth = LOWORD(lParam);  // width of client area
>> nHeight = HIWORD(lParam); // height of client area
>
> Ehh. At the moment the LCL thinks that WM_SIZE contains the bounds of
> a control. The ClientArea can be smaller (TGroupBox, TForm with a
> menu) or in some cases bigger (TScrollBox).

?? In TControl.WMSize it tries to do SetBounds with the Width and Height
parameters...SetBounds in the LCL is defined as clientwidth and height, no?

Where and how is the difference made between ClientHeight and Height and
ClientWidth and Width?

Micha.






More information about the Lazarus mailing list