[Lazarus] Purpose of MouseCapture?

Hans-Peter Diettrich DrDiettrich1 at aol.com
Mon Jan 10 04:36:25 CET 2011


Paul Ishenin schrieb:

>> Since a DragManager has no HWND and cannot capture the mouse itself, a 
>> safe implementation would redirect all mouse and keyboard events to an 
>> dragging DragManager immediately, instead of delivering the events to 
>> the target control, in the hope that it will *in any case* forward the 
>> messages to the DragManager.
> When you drag from one window to another the space between windows is 
> not owned by your application and therefore nobody forward messages to 
> the drag manager.

The mouse must be captured when dragging starts, of course. But 
afterwards all mouse messages must be handled *only* by the DragManager, 
until dragging is finished.

Please note that I never said that a mouse capture is of no use at all. 
But it must be handled properly, what is not the case in the current LCL 
implementation.

DoDi





More information about the Lazarus mailing list