Maximise button in Native Titlebar

Hello!
I’ve got an audio plug-in with a Standalone version using the native OS titlebar, but there appears to be a bug with using setUsingNativeTitleBar(true) in JUCE on Windows. For some reason the maximise button is always disabled (I’d like to it be enabled), even when I’ve also set
setSize (900, 600);
setResizeLimits(900, 600, INT_MAX, INT_MAX);
setResizable(true, false);

Interestingly on MacOS, the maximise button works just fine, so it only affects the Windows build. How can I fix this?

Windows_Titlebar_Maximise

Add the following code to the initialization process of AudioProcessorEditor and the maximize button on the window will work.

	// Find StandaloneFilterWindow instance
    juce::StandaloneFilterWindow* standaloneWindow = nullptr;
    if (juce::PluginHostType::getPluginLoadedAs() == juce::AudioProcessor::wrapperType_Standalone)
    {
        auto& desktop = juce::Desktop::getInstance();
        const int numTopLevelWindows = desktop.getNumComponents();

        for (int i = 0; i < numTopLevelWindows; ++i)
        {
            if (auto window = dynamic_cast<juce::StandaloneFilterWindow*> (desktop.getComponent (i)))
            {
                standaloneWindow = window;
                break;
            }
        }
    }

    // Change button settings when StandaloneFilterWindow found
    if (standaloneWindow != nullptr)
    {
        standaloneWindow->setTitleBarButtonsRequired (juce::DocumentWindow::allButtons, false);
    }

Thanks for this code snippet!

Could you please explain which includes are needed to get this to compile?

I have these dependencies included in my CMake file:

target_link_libraries(SharedCode
INTERFACE
Assets
melatonin_inspector
juce_audio_devices
juce_audio_formats
juce_audio_utils
juce_audio_processors
juce_audio_plugin_client
juce_dsp
juce_gui_basics
juce_gui_extra)

If I use this include it attempts to compile the application but fails:

#include “juce_audio_plugin_client/Standalone/juce_StandaloneFilterWindow.h”

If I simply try to use <juce_audio_plugin_client/juce_audio_plugin_client.h> instead it doesn’t work either.

How I can get this working?