Plugin dev: Window title bar successfully removed but ...

Hi All,

I am developing a VST plugin that its removes title bar at runtime. To do so, the plugin changes the window style at runtime, i.e. in ms-windows version I do:

HWND parentHWnd = static_cast(systemWindow);

SetWindowLong(parentHWnd, GWL_STYLE, GetWindowLong(parentHWnd, GWL_STYLE) & !WS_CHILD);

SetWindowLong(parentHWnd, GWL_STYLE, GetWindowLong(parentHWnd, GWL_STYLE) | WS_POPUP);

In Live, everything looks great, the plugin window frame is gone, no window title bar, no window frame. But in Renoise 32bit 2.8.2, the VST plugin window has a sort of status bar with an enable keyboard checkbox and a random button.

Now, is it possible to have my VST plugin not display this portion of the window? Changing a window style or something?

Steph

P.S.: I know it is not standard for a VST plugin to have no window frame but we are doing VST that render graphics synchronized with the music and do not want a VST window frame.

I develop a series of VST for my brother musician to render graphics in live context. For the moment, the VSTs are for his exclusive usage only. So he gets original visual. Maybe we will release them at some point down the road.

OK, I found the answer to my question. We can remove both titlebar and statusbar of the renoise plugin window. The code for removing renoise plugin titlebar is in my question. Here is the code for removing renoise plugin statusbar:

if(1)

{

if(editor)

{

if(editor->isOpen())

{

HWND parentHWnd = ((ExampleEditor*)editor)->GetParentHWND();

if(parentHWnd)

{

//find and hide renoise status bar

HWND statusHWnd = FindWindowExA( parentHWnd, 0, “Static”, “”); //renoise statusbar is a child of the plugin parent window and has for classname “Static”

if(statusHWnd)

{

ShowWindow( statusHWnd, SW_HIDE);

}

}

}

}

}

That code is placed in theprocessReplacing() function of the plugin. Only one of my client uses that code, so most of the time there is the if(0) to avoid doing that at every block of frames. I could not find a place elsewhere where the renoise plugin statusbar was created already, a better place I could inser that code.

That code is placed in theprocessReplacing() function of the plugin. Only one of my client uses that code, so most of the time there is the if(0) to avoid doing that at every block of frames. I could not find a place elsewhere where the renoise plugin statusbar was created already, a better place I could inser that code.

This is not a good idea. Don’t do any GUI stuff in the audio processing threads. This will sooner or later crash.

This quite likely is the reason for your problem here:https://forum.renoise.com/t/fatal-vst-plugin-error-in-renoise/40681

Your plugin is being called from the host in at least two different threads - !concurrently!:

The thread calling ProcessReplacing and processEvents is the audio thread. Only do number crunching here - raw DSP processing.

The other thread is a GUI thread. Hosts will query “display” relevant things from the plugin here, open it’s GUI, draw it, read and write the plugin’s state.

You’re new to programming, so you can’t know this yet, but this is a very sensible and very important topic. If you don’t know what you’re doing here, things will sooner or later randomly start crashing, so I’d heartily recommend to research this topic a little bit first.