Since the Delphi 2006 version, you can activate the full mouse wheel support (Intellimouse) by adding to the Uses statement the IMouse unit. for example to activate the Intellimouse support to a TMemo component you must set the ScrollBars property to ssHorizontal, ssVertical or ssBoth and add the IMouse unit to your project.
and the result will look like this.
So far all will work ok, but if you add the next line to your project, to report the memory leaks.
[sourcecode language=”delphi”]
ReportMemoryLeaksOnShutdown:=True;
[/sourcecode]
you will receive a awful message like this
this is due which in the IMouse unit the Mouse.PanningWindow is never released. to avoid this memory leak you must add these lines to your project in the finalization part of your main unit or in the unit where your declare the IMouse unit.
[sourcecode language=”delphi”]
if Assigned(Mouse.PanningWindow) then
Mouse.PanningWindow := nil;
[/sourcecode]


