Hi,
I had already tried that, but the problem is I don't have access to the wheel delta using that method.
I didn't see anyway to tell what way the user was moving the mouse wheel.
In Delphi because the forms onmousewheel gets all the mouse wheel input you can use it to to scroll a tscrollbox that has a lot of controls on it that steal the mousewheel focus.
i.e.
procedure Tdataframe.FormMouseWheel(Sender: TObject; Shift: TShiftState;
WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
var
msg: Cardinal;
code: Cardinal;
i, n: Integer;
begin
if sbox = nil then
exit;
if not sbox.Focused then exit;
Handled := true;
If ssShift In Shift Then
msg := WM_HSCROLL
Else
msg := WM_VSCROLL;
If WheelDelta > 0 Then
code := SB_LINEUP
Else
code := SB_LINEDOWN;
n:= Mouse.WheelScrollLines;
For i:= 1 to n Do
sbox.Perform( msg, code, 0 );
sbox.Perform( msg, SB_ENDSCROLL, 0 );
end;