Could somebody explain me the sizing mechanism in the LCL? I can't figure out how it…
Show quoted text 6 lines
The LCL sends LM_SETSIZE messages to the interface in TWinControl.InitializeWnd and TWinControl.RealizeBounds. The InitializeWnd is called at the end of the handle creation, right before the LM_SHOWHIDE message. The TWinControl.RealizeBounds is called whenever the LCL is ready to commit. That means it does not send LM_SETSIZE messages during loading, or the handle is not created, or while autosizing, or it already sent a size message with the current bounds. The LCL therefore sends less size messages than the VCL.
A Form1.Height:=300; first changes the width of the LCL control, without sending a message. Then the autosizing is invoked (align, anchors, constraints). If this changes the bounds the LM_SETSIZE message is sent.
Mattias
