[lazarus] Win32: moving and message handling

Karl Brandt pascalive at bol.com.br
Sun Jul 6 17:05:49 EDT 2003


Micha Nelissen wrote:

> (Maybe compensate for client rect ourselves, but certainly don't use the 
> GetWindowRect / GetClientRect functions). This also explains the weird 
> behaviour of maximizing: The form stays the same size because 
> GetClientRect returns the previous client size, not the current one.

I have some binaries where maximizing works properly with calling
GetWindowRect / GetClientRect functions in WM_SIZE and WM_MOVE.
The problem is in another place.
In really, GetClientRect in WM_SIZE isn't necessary since the 
LoWord/HiWord(LParam) already give the client sizes, but changing this 
doesn't fix maximizing.


> About message handling: maybe it would be better the always first pass 
> the message into the LCL, then if the LCL doesn't handle, let it pass 
> through and call the default window proc in DefaultHandler. The problem 
> is that now the LCL first receives WM_MOVE and then WM_WINDOWPOSCHANGED 
> because internally windows calls WM_MOVE inside handling the 
> WM_WINDOWPOSCHANGED.

Currently LM_WINDOWPOSCHANGED does nothing. All is done with WMSize and
WMMove.
The order of the messages is : WM_WINDOWPOSCHANGED > WM_MOVE and/or WM_SIZE

karl








More information about the Lazarus mailing list