VSTGUI onWheel never got called?

DSP, Plugin and Host development discussion.
Post Reply New Topic
RELATED
PRODUCTS

Post

Hi
I'm trying to create an interface for my VST in VSTGUI. First I like to say how poor the documentation for this is (for the 3.0 anyway). I had to keep refering to yvan grabit's 2.2 documenation for some more clarity. But it still doesn't clear everything. There are two many overlapping functions that just seemed unnecessary. And the drawtest does not give examples of some of the more "useful" functions.

Anyway, I can't get the onWheel event to happen at all. Am I missing something here? I've placed a debug trace string in the original vstgui sdk code and it still doesn't get called.

Any help would be appreciated.

Post

I haven't used the wheel functions in VSTGUI so I'm sorry to say I can't help you there. However, I do suggesting upgrading to the latest version, probably beta 3.5 or 3.6 instead of the 3.0 version. You'll find the code to be greatly cleaned up as well as having quite a bit snappier performance on drawing and control manipulation. As far as the lack of documentation that isn't really addressed but it is a good exercise in being able to interpret code based on its own merits. Think of it as a learning experience :D

Post

Hmm, I just tried 3.5 and GUI does seem to perform a little better.

Guess I'll give the code a read.

Thanks.

Post

It also depends on the host's capabilities in the versions of VSTGui that come with the VST SDK 2.x, since this uses an undocumented "feature" of the VST protocol, where the host has to send wheel informations using the rather cryptic call

Code: Select all

pEffect->dispatcher(pEffect, effVendorSpecific, 'stCA', 'Whee', NULL, value);
... and not every host sends that.
"Until you spread your wings, you'll have no idea how far you can walk." Image

Post

Wheel works fine for me in OSX as is in 3.0-3.6, but in windows i found i had to add SetFocus((HWND)pHwnd); to the end of CFrame::initFrame in vstgui.cpp to get it to work.

Post

If you are on windows go to vstgui.cpp and search for LRESULT CALLBACK MouseProc function. Is it implemented at all? Is compiler switch USE_MOUSE_HOOK active?

Post

gnjp wrote:Wheel works fine for me in OSX as is in 3.0-3.6, but in windows i found i had to add SetFocus((HWND)pHwnd); to the end of CFrame::initFrame in vstgui.cpp to get it to work.
That solved the problem. But the focus is lost as soon as I switch to another window.

Post

I put the SetFocus((HWND)pHwnd) in the event main handler for
CFrame too in on mousedown, so when you click on the GUI again it re-focuses
the window.

Post

Post-digging here a little, but just in case anybody stumbles on this thread in future wondering why their VSTGUI mouse wheel events are not coming through in some hosts on PC and finds this doesn't quite fix their problem, it may be worth trying the code out in this link where the WM_NCHITTEST section is, as it helped me out.

Post Reply

Return to “DSP and Plugin Development”