Mattias Gaertner wrote:
On Fri, 02 Dec 2005 14:42:36 +0100
Vincent Snijders <[EMAIL PROTECTED]> wrote:
Now, if I let the LCL handle the messages first, the capture is lost
when windows handles wm_lbuttonup, which results in some events not
firing (e.g. TButton Click, which is triggered by a WM_COMMAND,
BN_CLICKED combination).
So winapi needs to capture itself?
Apparantly, that would be the best.
If I let windows handle the message first, the LCL doesn't pass the
message to the TCustomControl in IsControlMouseMsg, because the LCL asks
the interface if any control as the capture and it turns out the
(wincontrol) parent of the TCustomControl has the capture.
Somehow the CaptureControl variable needs to be set when the winapi captures
the mouse.
Why? Is the CaptureControl variable only an optimization, or does it
have different meaning from FindLCLControl(GetCapture) ?
Why does the LCL capture the mouse so often ? Capturing should be done
by users of the LCL, or by the widgetset IMHO, but maybe I'm overlooking
something.
Does the win32 intf know, when winapi has captured? Then maybe it could
adjust the variable.
No, there is no way to know when capturing starts. There is only
GetCapture to request what window has the capture, if any.
Micha
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives