[Lazarus] OnMouseWheel[Down/Up] support in TControl (patchincluded)
Mattias Gaertner
nc-gaertnma at netcologne.de
Wed Jun 11 19:06:07 CEST 2008
On Wed, 11 Jun 2008 11:34:30 +0300
"Kostas Michalopoulos" <badsector at slashstone.com> wrote:
> > No, it's a Delphi compatibility. I tested CM_MOUSEWHEEL, the
> > equivalent message of LM_MOUSEWHEEL. Under Delphi XPos and YPos
> > fields returns screen coordinates.
> > Furthermore, OnMouseWheel MousePos also is at screen coordinates.
> >
> > Luiz
>
> I assume you mean *in*compatibility :-).
>
> Anyway i'm not sure if it is so important to bring this in screen
> coordinates (what is the behavior in other toolkits btw? GTK reports
> it in screen or client coordinates?). Personally i see this as a
> Delphi bug (even if its actually Windows who report it in screen
> coords) and i would suggest it to be in client coordinates so the
> behavior is consistent for all mouse events and put a note in the
> wiki page about converting Delphi code to Lazarus. So the options are:
>
> 1. Keep the patch as-is. Report it in client coords, be consistent
> with other mouse events and introduce a small Delphi incompatibility.
> I prefer this.
> 2. Modify LCL so that it brings the client coords to screen after the
> control is found for a LM_MOUSEWHEEL message so that is Delphi
> compatible (note: the screen-to-client convertion i made in
> WM_MOUSEWHEEL handler is still needed for LCL to figure out the
> correct control to send the message - unless, of course, LCL is
> further modified to accept screen coords from Win32 and client coords
> from other toolkits).
Does someone know, if the newer Delphi flavors still have this
inconsistency? Even Delphi .net?
Mattias
More information about the Lazarus
mailing list