This project has moved and is read-only. For the latest updates, please go here.

WPF plugin editor = knightmare

Topics: Editor UI
Sep 15, 2012 at 7:32 PM

I tried to make a simple VST with a WPF gui, all from scratch, without using VST.NET and I'm stuck on a horrible keyboard issue (in cubase): the keyboard is not properly redirected to the WPF window. I found this:

the trick is to respond to DLGC_WANTALLKEYS to WM_GETDLGCODE

and null out HACCEL.

Actually, I tried only the first step (WM_GETDLGCODE) and my gui receive the keyboard BUT all cubase shortcut grab the keyboard before my GUI. I will try the HACCEL stuff ... when I'll understand it :-)

your WpfControlWrapper use HwndSourceParameters like I expected, but what about keyboard ? Does theses stuff are used in VST.NET ?



Sep 16, 2012 at 12:43 PM

The WPF gui is part of a sample and its not part of "official" VST.NET release.

I never tested that code in Cubase. My main test host is VstHost by Hermann Seib.

You might try other Host applications for reference. Also note that there are two methods on the editor interface that have to do with key. I never used them (needed to use them) but you might want to check out if Cubase is calling those.

Hope it helps,

Sep 16, 2012 at 8:01 PM

I'm pretty sure it has nothing to do with cubase. it is a WPF issue. The test app from

reproduce perfectly the bug. the native MFC app use shortcuts and they are handled before the WPF GUI.

Aug 25, 2013 at 12:59 PM
Did anybody find a working solution for the MFC issues? It would be nice if you could post a sample here.
Feb 12, 2014 at 5:21 AM
Just ran into this problem in Reaper; trying to figure out how to handle it. If anyone out there has pointers (or the aforementioned sample)...