Home All Groups Group Topic Archive Search About

Responding to horizontal scroll messages from MS mice

Author
22 Sep 2005 7:21 PM
Sebastian Mares
Hello!

Does anyone know how to respond to the horizontal scroll messages sent by
Microsoft mice (the ones which allow you to move the wheel to the left and
right)?

Regards,
Sebastian

Author
22 Sep 2005 11:29 PM
Veign
I don't have that mouse to test anything but you may want to see if the
examples at VBAccelerator get you pointed in the right direction.

One sample:
http://www.vbaccelerator.com/home/VB/Tips/Detecting_Mouse_XButton_Clicks/article.asp

--
Chris Hanscom - Microsoft MVP (VB)
Veign's Resource Center
http://www.veign.com/vrc_main.asp
Veign's Blog
http://www.veign.com/blog
--


Show quoteHide quote
"Sebastian Mares" <SebastianMa***@discussions.microsoft.com> wrote in
message news:402653F1-BE64-4612-873C-F5B89705CF2B@microsoft.com...
> Hello!
>
> Does anyone know how to respond to the horizontal scroll messages sent by
> Microsoft mice (the ones which allow you to move the wheel to the left and
> right)?
>
> Regards,
> Sebastian
Author
23 Sep 2005 6:18 AM
Sebastian Mares
Hello!

Thanks for the suggestion, but I already tried the vbAccelerator suggestion
and it didn't work. Moreover, every now and then the example project they
have leads to a general protection fault (when compiled, not in the IDE).

Regards,
Sebastian

Show quoteHide quote
"Veign" wrote:

> I don't have that mouse to test anything but you may want to see if the
> examples at VBAccelerator get you pointed in the right direction.
>
> One sample:
> http://www.vbaccelerator.com/home/VB/Tips/Detecting_Mouse_XButton_Clicks/article.asp
>
> --
> Chris Hanscom - Microsoft MVP (VB)
> Veign's Resource Center
> http://www.veign.com/vrc_main.asp
> Veign's Blog
> http://www.veign.com/blog
> --
>
>
> "Sebastian Mares" <SebastianMa***@discussions.microsoft.com> wrote in
> message news:402653F1-BE64-4612-873C-F5B89705CF2B@microsoft.com...
> > Hello!
> >
> > Does anyone know how to respond to the horizontal scroll messages sent by
> > Microsoft mice (the ones which allow you to move the wheel to the left and
> > right)?
> >
> > Regards,
> > Sebastian
>
>
>
Author
22 Sep 2005 11:44 PM
Mike D Sutton
> Does anyone know how to respond to the horizontal scroll messages sent by
> Microsoft mice (the ones which allow you to move the wheel to the left and
> right)?

Unfortunately I don't have access to a tilt wheel mouse to test with, but after a quick Google I found this:
http://www.tech-archive.net/Archive/Development/microsoft.public.win32.programmer.ui/2004-04/0571.html
Hope this helps,

    Mike


- Microsoft Visual Basic MVP -
E-Mail: ED***@mvps.org
WWW: Http://EDais.mvps.org/
Author
23 Sep 2005 6:19 AM
Sebastian Mares
Thanks, that sounds promising. I will try it out ASAP.

Show quoteHide quote
"Mike D Sutton" wrote:

> > Does anyone know how to respond to the horizontal scroll messages sent by
> > Microsoft mice (the ones which allow you to move the wheel to the left and
> > right)?
>
> Unfortunately I don't have access to a tilt wheel mouse to test with, but after a quick Google I found this:
> http://www.tech-archive.net/Archive/Development/microsoft.public.win32.programmer.ui/2004-04/0571.html
> Hope this helps,
>
>     Mike
>
>
>  - Microsoft Visual Basic MVP -
> E-Mail: ED***@mvps.org
> WWW: Http://EDais.mvps.org/
>
>
>
Author
24 Sep 2005 7:40 AM
Sebastian Mares
Hmm... Do I have to send any messages to a picture box in order to receive
the tilt wheel messages? I have a picture box and two scroll bars. When the
user scrolls the wheel (vertically) over the picture box, I can get the
VScroll to scroll, but it doesn't work for the HScroll. I tried printing all
messages and parameters passed to the picture box, but while vertical scroll
messages are passed, I never receive a vertical scroll message.

Show quoteHide quote
"Mike D Sutton" wrote:

> > Does anyone know how to respond to the horizontal scroll messages sent by
> > Microsoft mice (the ones which allow you to move the wheel to the left and
> > right)?
>
> Unfortunately I don't have access to a tilt wheel mouse to test with, but after a quick Google I found this:
> http://www.tech-archive.net/Archive/Development/microsoft.public.win32.programmer.ui/2004-04/0571.html
> Hope this helps,
>
>     Mike
>
>
>  - Microsoft Visual Basic MVP -
> E-Mail: ED***@mvps.org
> WWW: Http://EDais.mvps.org/
>
>
>
Author
24 Sep 2005 11:11 AM
Mike D Sutton
> Hmm... Do I have to send any messages to a picture box in order to receive
> the tilt wheel messages? I have a picture box and two scroll bars. When the
> user scrolls the wheel (vertically) over the picture box, I can get the
> VScroll to scroll, but it doesn't work for the HScroll. I tried printing all
> messages and parameters passed to the picture box, but while vertical scroll
> messages are passed, I never receive a vertical scroll message.

As mentioned in my prior post I don't have access to a tilt wheel mouse so I'm unable to test this, however I would assume the mouse
driver would be responsible for sending the correct messages to the window the cursor is currently over.  If you're not seeing the
messages coming through then I would recommend grabbing the latest drivers and see if that makes any difference.
When you say you printed all the messages and parameters, do you mean you've put code in each of the event handlers for the VB
object or that you've subclassed the window and are printing out the WM_* messages it's being sent?  The latter should give you a
more accurate representation of what's actually being sent to the window rather than just what VB chooses to interpret.
Hope this helps,

    Mike


- Microsoft Visual Basic MVP -
E-Mail: ED***@mvps.org
WWW: Http://EDais.mvps.org/
Author
24 Sep 2005 12:06 PM
Sebastian Mares
Hi!

What I mean is that I subclassed the picture box / form and am printing
uMsg, lParam and wParam.
When I am subclassing a text box with horizontal scroll bars, the horizontal
scroll message seems to be intercepted, so I might have to send some messages
to the picture box to make Windows thing it's scrollable.

Show quoteHide quote
"Mike D Sutton" wrote:

> > Hmm... Do I have to send any messages to a picture box in order to receive
> > the tilt wheel messages? I have a picture box and two scroll bars. When the
> > user scrolls the wheel (vertically) over the picture box, I can get the
> > VScroll to scroll, but it doesn't work for the HScroll. I tried printing all
> > messages and parameters passed to the picture box, but while vertical scroll
> > messages are passed, I never receive a vertical scroll message.
>
> As mentioned in my prior post I don't have access to a tilt wheel mouse so I'm unable to test this, however I would assume the mouse
> driver would be responsible for sending the correct messages to the window the cursor is currently over.  If you're not seeing the
> messages coming through then I would recommend grabbing the latest drivers and see if that makes any difference.
> When you say you printed all the messages and parameters, do you mean you've put code in each of the event handlers for the VB
> object or that you've subclassed the window and are printing out the WM_* messages it's being sent?  The latter should give you a
> more accurate representation of what's actually being sent to the window rather than just what VB chooses to interpret.
> Hope this helps,
>
>     Mike
>
>
>  - Microsoft Visual Basic MVP -
> E-Mail: ED***@mvps.org
> WWW: Http://EDais.mvps.org/
>
>
>
Author
24 Sep 2005 12:32 PM
Mike D Sutton
> What I mean is that I subclassed the picture box / form and am printing
> uMsg, lParam and wParam.
> When I am subclassing a text box with horizontal scroll bars, the horizontal
> scroll message seems to be intercepted, so I might have to send some messages
> to the picture box to make Windows thing it's scrollable.

More than likely then it's only sending the message to those windows with the WS_HSCROLL style set.  You can set the style on a
window however by default it will draw a horizontal scroll bar at the bottom of it's client area so if you don't require one you
would have to disable it.
Hope this helps,

    Mike


- Microsoft Visual Basic MVP -
E-Mail: ED***@mvps.org
WWW: Http://EDais.mvps.org/