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
{
public:
MainAppWindow():DocumentWindow(JUCEApplication::getInstance()->getApplicationName()+" ("+JUCEApplication::getInstance()->getApplicationVersion()+")",
Colours::black, DocumentWindow::allButtons, true)
{
setResizable(true, false);
setUsingNativeTitleBar(true);
setContentComponent(new Component());
test();
}
~MainAppWindow()
{
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();
e1->setTopLeftPosition(10,10);
e2->setTopLeftPosition(600,20);
c->addAndMakeVisible(e1);
c->addAndMakeVisible(e2);
}
void closeButtonPressed()
{
JUCEApplication::getInstance()->quit();
}
void paint(Graphics& g)
{
g.fillAll(Colours::white);
}
};[/code]