|Posted by:||Christian Kaufmann (christian.kaufma…@gmx.net)|
|Date:||Tue, 30 Aug 2011|
I did the following change in my TForm subclass to have a different
procedure TBSForm.MouseWheelHandler(var Message: TMessage);
// MouseWheel should be handled by control at CursorPos
// and not by FocusedControl
ctrl := FindVCLWindow(Mouse.CursorPos);
if Assigned(ctrl) and (ctrl <> ActiveControl) then begin
Message.Result := ctrl.Perform(CM_MOUSEWHEEL, Message.WParam,
if Message.Result = 0 then
The problem is, that if somebody uses the mousewheel on a button
directly on the form, this ends in a recursion.
What is wrong with my method?