VST3 resize initiated from Plug-In

Hello,
I am trying to develop the resize initiated from Plug-In as described here:

I am already able to obtain a very nice resize initiated from the host (Reaper in my case). So when I resize manually the window from the DAW, the GUI inside is rescaled.

Now I want to manage the resize initiated from the Plug-In. When I call resizeView from my PluginView, it seems the host is calling directly onSize: all the calls to getSize shown in the sequence diagram are not present. The end result is that the GUI inside of window is resized correctly, but the window managed by the host is not resized by the host.

This is how I defined PluginView:

class PluginView : public CPluginView
{
public:
PluginView(Plugin* iPlugin);
~PluginView();

// CPluginView overrides
tresult PLUGIN_API attached(void* parent, FIDString type);
tresult PLUGIN_API removed();

// IPlugView overides
tresult PLUGIN_API onSize(ViewRect* newSize);
tresult PLUGIN_API getSize(ViewRect* size);
tresult PLUGIN_API isPlatformTypeSupported(FIDString type);

tresult PLUGIN_API canResize();
tresult PLUGIN_API checkSizeConstraint(ViewRect* rect);

void resize(int iWidth, int iHeight);

tresult PLUGIN_API setFrame(Steinberg::IPlugFrame* frame) override;

protected:
Plugin* _plugin;
};

Am I missing anything? Why the host is not calling my getSize?

Thanks in advance

PS: I could not find a working example, if you have one, please feel free to post it :slight_smile:

Davide

The call of getSize() to the plug-in is optional. The important part here is that you call requestSize() before you change your internal size of your view and do the resize only when onSize() is called from the host. You never change your view size outside of the onSize() method.