View Single Post
Old 08-12-2011, 08:12 AM   #3
HoRNet
Human being with feelings
 
Join Date: Feb 2011
Posts: 171
Default

well, i know is not supported by the VST spec, but VSTGUI has the resize code in it and i've found this link:

http://www.oifii.org/ns-org/nsd/ar/c...maceditor.html

that states this:

Code:
Resizing the Plug-In

If you want to resize your view, just do it, but don't resize the host window.
HIRect pluginBounds;
HIViewGetFrame (myPluginView, &pluginBounds);
pluginBounds.size.width = newWidth;
pluginBounds.size.height = newHeight;
HIViewSetFrame (myPluginView, &pluginBounds);
The host needs to listen to bounds changes on the Plug-In view and resize its window accordingly.
that is very similar to the code found in IPlug in IGraphicsCarbon, but ever replacing the code with the above one i still get the crashes (tested in Ableton Live 7 BTW).

Regarding the "main thread" argument the fact that:

Code:
The host needs to listen to bounds changes on the Plug-In view and resize its window accordingly.
make me think that the host owns the thread that should do the resize, how plugins like Reaktor handles this since the gui is resizable...

I've read on KVR tips on creating a child window in the main window provided by the host so that the process is completely owned by the plugin and you can do whatever you want with your window, but it seems more complicated and a lot of code (that may fail) to manage...
HoRNet is offline   Reply With Quote