One thing I'm trying to do is have the scroll wheel do horizontal scrolling
if the back button is held down. I find this works better than tilting the
wheel where you're stuck with one scroll speed. I've gotten this to work
pretty well in most applications. The approach I'm using is to send a
WM_HSCROLL message to the active control in the active window which works
most of the time. In some applications it doesn't work or causes problems
but usually I can put those applications in as exceptions and use some
combination of keyboard hotkeys to substitute.
One application where I've been unable to get satisfactory results is
Microsoft Excel. There is a keyboard hotkey method which is to turn on the
scrolllock then use the arrow keys for scrolling. This doesn't work,
however, if you're editing the contents of a cell. In this case the arrow
keys move the text cursor, even with scrolllock enabled. The WM_HSCROLL
message doesn't work because the required lParam changes each time Excel is
loaded. My current best solution sends mouse clicks to the "Scrollbar2"
control which is usually the horizontal scrollbar. However, if the window is
split or frozen either the name of the control changes or there are 2
horizontal scrollbar controls and there's no easy way to choose between
them.
I'm wondering if anyone knows how the mouse driver deals with Excel when
sending it horizontal scrolling commands in response to the tilt wheel. I'd
like to replicate it if it's possible.
Thanks!