ResizableWindow not receiving WM_CHAR (Win32, VST)


#1

In my VST, I create a ResizableWindow:

m_pWindow = new ResizableWindow(name, true); m_pWindow->setContentOwned(pComponent, true); m_pWindow->setWantsKeyboardFocus(true); m_pWindow->setUsingNativeTitleBar(true); m_pWindow->setVisible(true);

It contains a text editor component, and although arrow keys let me traverse the text, I can’t actually type anything. If I create the same component to be shown within the AudioProcessorEditor, then it does let me edit. I’ve ensured that it is not read-only.

Digging into it and breakpointing in windowProc, it appears that the ResizableWindow is not receiving WM_CHAR messages, although it is clearly returning DLGC_WANTALLKEYS. The AudioProcessorEditor correctly receives all WM_CHAR messages.

I’ve seen lots of posts about VST hosts blocking keyboard messages, but in this case, something is blocking the new window–not the primary VST window. I’m using a nearly year-old version of Juce, and I can’t do an update at the moment. :frowning:

Any idea what could be happening? Do top level windows require some special setup to get WM_CHAR messages?

Thank you,
Sean


#2

I know its not what you want to hear, but if all else fails try cloning the latest tip and building the “audio plugin demo” and see if the plugin editor gets keypresses. You can modify the JuceDemoPluginAudioProcessorEditor constructor and toss a TextEditor in there, compile, and test in your host.

If it works in the tip, then we know the problem is either your outdated version of JUCE, or the way you are setting up the TextEditor. If it is still broken when you use the JUCE tip, then we know it is the host causing the problem.


#3

Thanks for the quick reply. I did as you suggested, and it looks like Plogue Bidule isn’t very nice to my VST. Reaper is, though. :wink:


#4

Thats the default behavior of Plogue Bidule. Its a mess: every host has its own behavior handling key events!
Me experience is: You should always have the possiblity to enter a text through the plugin-editor-window directely, or through a seperate window.
Seperate Window will work in most Hosts, except Plogue Bidule. (I check the name of the Host-exe, and then choose the right method)


#5

I’ve been using Bidule as my VST testing app for a while now, and this is the first time I’ve had a problem with it. Given the variety of hosts out there, and that all the complex keystroke interaction will be in this second window, I may attempt to make it a separate process instead of dealing with the hosts. There’s already a disconnected message layer between the two, so it shouldn’t be difficult.

Thanks for your help everyone.

Sean


#6

As a followup, I’ve been in contact with Plogue, and it looks like Seb’s found the cause of the bug on their side: http://plogue.com/phpBB3/viewtopic.php?f=10&t=6214


#7

Nice followup! And when I click that link it almost feels like I never even left the JUCE forum!