Preventing plugin window resizing

Hello experts,
My question is: how to prevent attempts to resize the plugin window?
Apparently the editor function
tresult PLUGIN_API canResize() { return kResultFalse; }
should tell the host that the plugin should have a constant size. I’ve also experimented with the onSize and checkSizeConstraint functions, however there is nothing stopping the host from resizing the container window that the plugin window is in. This is what it looks like in Spy++:

The window highlighted in blue is my plugin. I can get this window handle with
HWND hWnd = frame->getOuterWindow();
The handle underlined in pink is the window that Cakewalk creates, which houses my plugin. This window has the WS_THICKFRAME style, which allows the window to be resized. If I change the window size, then the size of my plugin does not change, but the size of the first two windows (that is, the one highlighted in pink and the one after it) changes.
How can I make it so that it is impossible to change the size of the container window (i.e. the one highlighted in pink)? Naturally, this should work for all hosts.

By the way, I checked other plugins (even commercial ones) - the situation is the same. Is this a Cakewalk bug or is there something I can do?

Looks like a Cakewalk bug. As a plug-in you only have to return kResultFalse from IPlugView::canResize().

1 Like