[lazarus] Win32: moving and message handling
Mattias Gaertner
nc-gaertnma at netcologne.de
Sun Jul 6 16:19:53 EDT 2003
On Sun, 06 Jul 2003 15:56:24 +0200
Micha Nelissen <M.Nelissen at student.tue.nl> wrote:
> Hi,
>
> I still have to object again the latest patch for WM_MOVE handling, the
> previous one was better. That is because the internal variables haven't
> been updated when WM_MOVE is sent, only after it has been processed they
> are updated. So when GetWindowRect is called it retrieves the wrong
> values. So use the information in the LParam at least:
>
> XPos := LoWord(LParam);
> YPos := HiWord(LParam);
>
> (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.
The maximizing should now be better.
Mattias
>
> 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.
>
> Regards,
>
> Micha.
>
>
> _________________________________________________________________
> To unsubscribe: mail lazarus-request at miraclec.com with
> "unsubscribe" as the Subject
> archives at http://www.lazarus.freepascal.org/mailarchives
--
More information about the Lazarus
mailing list