public static void add(Control ctrl, on_wheel_func on_wheel) { var filter = new wheel_filter(ctrl, on_wheel); Application.AddMessageFilter(filter); ctrl.Disposed += (s, e) => Application.RemoveMessageFilter(filter); }
public wheel_filter(Control ctrl, on_wheel_func on_wheel) { ctrl_ = ctrl; on_wheel_ = on_wheel; }