I don't understand, sorry.. You mean you begin dragging inside cubase's window, then move out over your plugin's UI? If so, I don't see how it could get the events at all, as they should still be getting sent to the window that got the original mouse-down..?
Can't think of an easy fix to suggest.. I can't change the way that the juce window handling responds to the mouse-wheel button, because that might break other people's code. You might be able to add a hack to check for it yourself in the win32 stuff, I guess.
The following hack in juce_win32_Windowing.cpp worked for me and seems not to have negative impact even
if you try to drag&drop something from outside the app. Tested with JuceDemo.
void doMouseMove (Point<int> position)
{
//This is to avoid triggering of drag&drop when
//dragging the mouse over a component from outside
if (! isFocused())
return;
if (! isMouseOver)
{
isMouseOver = true;
ModifierKeys::getCurrentModifiersRealtime(); // (This avoids a rare stuck-button problem when focus is lost unexpectedly)
updateKeyModifiers();
No, I think you'd often want unfocused windows to get mouse-move events, so there are many places where that change would cause terrible problems. Perhaps ignoring events when the button is already down in another window might make sense, but definitely not what you're suggesting there..