delphi - Need example for for WM_MouseWheel -


my control(like tmemo) has not mousewheel code. how add correct wheel handler scrolls correct num of lines - if controlpanel has set 3 lines per rotate, need 3 lines scroll 1 rotate.

my test is

procedure tmymemo.wmmousewheel(var message: twmmousewheel);  var   delta: integer; begin   delta:= message.wheeldelta div 80 * mouse.wheelscrolllines;//??????   scrollposy := scrollposy - delta;   message.result := 1; end; 

i don't think 80 ok, it's guessed- works here (with win7). how correct num of lines scroll?

i found ok way. need write protected methods:

domousewheelup.....; override; domousewheeldown......; override; 

and in each, must scroll delta=mouse.wheelscrolllines.


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -