Loading a plugin GUI as a sub-component (instead of loading it as a new window)


#1

I’ve created a plugin host that successfully loads up plugins, but I’m trying to do something that I’m not sure has been done before (or at least I can’t find any discussion of it on the forums)

I’m trying to load plugins directly into my host’s GUI as a sub-component (in other words, instead of using a new window, I’m injecting the plugin’s UI into my host’s window) - it seems to be working fine for some plugins, but for others it gets a bit buggy. Sometimes the GUI of the plugin just loads as a black rectangle, most times the GUI of the plugin will load fine, but all the dials and knobs in its interface are unresponsive. What could be causing this? I’m having trouble locating the source of the issue because it’s not causing any crashes - don’t know where to start debugging.
plugin = formatManager.createPluginInstance(pluginDescription, deviceManager.getCurrentAudioDevice()->getCurrentSampleRate() , deviceManager.getCurrentAudioDevice()->getCurrentBufferSizeSamples(), errorMessage); editor = plugin->createEditor(); editor->setBounds((getWidth()-editor->getWidth())/2,((getHeight()-editor->getHeight())/2)+25, editor->getWidth(), editor->getHeight()); addAndMakeVisible(editor);


#2

I’d suggest not bothering to try that - plugins use a whole variety of tricks and hacks to display themselves, and unless each one is inside a window you can end up with some nasty plugin-specific bugs