如何在VST 2.4中创建子窗口

How can I create a child window in VST 2.4?

本文关键字:创建 窗口 VST      更新时间:2023-10-16

我创建ExampleEditor.h和ExampleEditor.cpp

ExampleEditor::ExampleEditor(AudioEffect *effect)
{           
    effect->setEditor(this);
};
bool ExampleEditor::open(void *ptr)
{
    //This is it?
return true;
};

VST插件文件构造函数我写

VstPlugin::VstPlugin(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, 1, 1)
{
    editor = new ExampleEditor(this);
}

在什么情况下我需要创建一个窗口?主窗口已经在VST中创建?我可以使用任何库或创建窗口吗?SDL2?有人能举一个很简单的例子吗?

假设Windows:In open(),将void*ptr强制转换为HWND。这是(主机提供的)父帧窗口的窗口句柄。当使用任何库时,在创建子插件窗口时将此句柄用作父句柄。您创建的子窗口必须设置WS_child标志。