Problems when trying to put 2 plugineditors into 1 Component


Please consider the following code, why are the 2 VST plugin editors not put on the correct positions? I need this to work as I want to create a big component with many plugins on it. This was on Windows, I haven’t tested on Mac.

[code]class MainAppWindow:public DocumentWindow
MainAppWindow():DocumentWindow(JUCEApplication::getInstance()->getApplicationName()+" ("+JUCEApplication::getInstance()->getApplicationVersion()+")",
Colours::black, DocumentWindow::allButtons, true)
setResizable(true, false);
setContentComponent(new Component());

	setContentComponent(0, true);

void test()
	Component *c=getContentComponent();

	VSTPluginFormat format;
	PluginDescription desc;
	desc.fileOrIdentifier="c:/audio/vstplugins/dx10 vsti.dll";
	AudioPluginInstance *d1=format.createInstanceFromDescription(desc);
	desc.fileOrIdentifier="c:/audio/vstplugins/IL Drumaxx.dll";
	AudioPluginInstance *d2=format.createInstanceFromDescription(desc);

	AudioProcessorEditor *e1=d1->createEditor();
	AudioProcessorEditor *e2=d2->createEditor();


void closeButtonPressed()

void paint(Graphics& g)



Hmm with some plugins it works, with others not. I assume that’s some bugs in the VSTs then.


Interesting fact: 1 plugin can always be placed anywhere onto a component. It’s only with 2 or more plugins that problems occur.


Many plugins will assume that they are the only child window in their parent, and will get confused if you try to make them share a parent. It really only works if you put them each in their own window, since that’s how all the hosts do it.


Wouldn’it be possible to add another intermediary dummy window where the actual VST plugin window is added to the VSTPluginWindow class inside juce_VSTPluginFormat.cpp ? So it would be the only child of that window. I guess that would work.


Yes, that’d probably do the trick.


Yes it does, I just tried it.