# Mouse Wheel Issue in Win - VST

**URL:** <https://forum.juce.com/t/mouse-wheel-issue-in-win-vst/9039>\
**Category:** Audio Plugins\
**Created:** [July 31, 2012, 11:47am UTC](https://forum.juce.com/t/mouse-wheel-issue-in-win-vst/9039 "2012-07-31T11:47:24Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shlomi](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/shlomi/32/99_2.png) [@Shlomi](https://forum.juce.com/u/Shlomi)\
**Post date:** [July 31, 2012, 11:47am UTC](https://forum.juce.com/t/mouse-wheel-issue-in-win-vst/9039/1 "2012-07-31T11:47:24Z")

</div>

Hello

When using the mouse wheel inside a viewport (ListBox or Viewport directly) the vertical scroll bar is immediately scrolls to the upper left regardless of  
the position of the scrolling / the amount scrolled.

This only happens in VST mode, in standalone mode it works fine (it also works fine in Mac standalone / AU / VST )

I’ve found that in the func. doMouseWheel() the line:

```auto
const float amount = jlimit (-1000.0f, 1000.0f, 0.5f * (short) HIWORD (wParam));
```

Always returns 1000 in the problematic cases.

Thanks

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [July 31, 2012, 12:56pm UTC](https://forum.juce.com/t/mouse-wheel-issue-in-win-vst/9039/2 "2012-07-31T12:56:34Z")

</div>

Hmm. Sounds like the same problem as this:  
[http://us.generation-nt.com/mousehookstructex-mousedata-contains-garbage-windows-7-64-bit-32-bit-application-help-28040522.html](http://us.generation-nt.com/mousehookstructex-mousedata-contains-garbage-windows-7-64-bit-32-bit-application-help-28040522.html)

---

<div class="post-metadata">

**Author:** ![ckk](https://avatars.discourse-cdn.com/v4/letter/c/d26b3c/32.png) [@ckk](https://forum.juce.com/u/ckk)\
**Post date:** [July 31, 2012, 1:31pm UTC](https://forum.juce.com/t/mouse-wheel-issue-in-win-vst/9039/3 "2012-07-31T13:31:43Z")

</div>

A similar issue is discribed [here](http://www.rawmaterialsoftware.com/viewtopic.php?f=2&t=7591): When more than one Juce-based plugin is opened only the last opened will get valid mouse messages.

I just added this Component to the Juce demo plugin where the mousewheel worked fine with the Viewport:

`class Container : public Viewport
{
public:
  Container()
  {
    editor.setSize(50, 200);
    setViewedComponent(&editor, false);
  }
private:
  TextEditor editor;
};
`  
It was sized to show a scroll bar (50x150). Could it be you ran into the issue described above?

Chris

---

<div class="post-metadata">

**Author:** ![Shlomi](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/shlomi/32/99_2.png) [@Shlomi](https://forum.juce.com/u/Shlomi)\
**Post date:** [July 31, 2012, 6:54pm UTC](https://forum.juce.com/t/mouse-wheel-issue-in-win-vst/9039/4 "2012-07-31T18:54:11Z")

</div>

This workaround won’t work for me but the thread you posted seems to hold the answer.  
I’ll check it out.

Thanks!

---

<div class="post-metadata">

**Author:** ![Shlomi](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/shlomi/32/99_2.png) [@Shlomi](https://forum.juce.com/u/Shlomi)\
**Post date:** [August 12, 2012, 9:55am UTC](https://forum.juce.com/t/mouse-wheel-issue-in-win-vst/9039/5 "2012-08-12T09:55:24Z")

</div>

It appears that it only happens when I use a cheap mouse ( ‘Silver Line’ ) it works fine with a standard mouse.

---

<div class="post-metadata">

**Author:** ![TheVinn](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/thevinn/32/806_2.png) [@TheVinn](https://forum.juce.com/u/TheVinn)\
**Post date:** [August 12, 2012, 6:38pm UTC](https://forum.juce.com/t/mouse-wheel-issue-in-win-vst/9039/6 "2012-08-12T18:38:12Z")

</div>

> [@Shlomi](#):
>
> It appears that it only happens when I use a cheap mouse ( ‘Silver Line’ ) it works fine with a standard mouse.

How is this even possible? I thought Windows used standard generic drivers for mice (the vendor specific driver can be installed to gain additional features but without it, the generic driver provides basic functions). If this is the case then mouse behavior should be independent of the application. Unless, your mouse has installed some kind of special software that treats applications differently. Logitech for example can do this, customize the mouse for each app (usually a game).

---

<div class="post-metadata">

**Author:** ![Shlomi](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/shlomi/32/99_2.png) [@Shlomi](https://forum.juce.com/u/Shlomi)\
**Post date:** [August 13, 2012, 6:49am UTC](https://forum.juce.com/t/mouse-wheel-issue-in-win-vst/9039/7 "2012-08-13T06:49:07Z")

</div>

When I first connected both of them Windows showed a messages that it is installing their drivers, so I guess it’s a specific driver issue.
