Page 1 of 1

PrintPreview.OnMouseWheel

PostPosted: February 24th, 2011, 6:43 pm
by klin
Hi, just a trifle - SB_LINEUP and SB_LINEDOWN in PrintPreview.OnMouseWheel are in wrong places.
They should be switched. And, if I can suggest, one line step is too small. This looks better:

Code: Select all
procedure TPrintPreview.WMMouseWheel(var Message: TMessage);
var I: Integer;
[...]
         if IsNeg then
         begin
            WheelAccumulator := -WheelAccumulator;
            case LoWord(Message.WParam) of
               MK_CONTROL: Zoom := Zoom - ZoomStep;
               MK_SHIFT, MK_MBUTTON: CurrentPage := CurrentPage + 1;
//               0: Perform(WM_VSCROLL, SB_LINEUP, 0);
               0: for I:= 0 to 4 do Perform(WM_VSCROLL, SB_LINEDOWN, 0); // klin
[...]

Re: PrintPreview.OnMouseWheel

PostPosted: February 25th, 2011, 4:25 pm
by Kambiz
Thank you for informing the issue.
The suggestion accepted; it works much smoother indeed.