Is it possible to get the windows 11 round corners on a juce standalone application window and not use the native title bar?
setUsingNativeTitleBar(false);
Found the solution in this forum post:
Here is an up-to-date version of that solution:
In your mainWindow component, add this at the top:
#if JUCE_WINDOWS || JUCE_MAC
extern void setRoundedCorners ( void*, bool );
#endif
And in your mainWindow component then add this:
#if JUCE_WINDOWS || JUCE_MAC
void parentHierarchyChanged () override
{
juce::DocumentWindow::parentHierarchyChanged ();
if ( auto peer = getPeer () )
setRoundedCorners ( peer->getNativeHandle (), ! isUsingNativeTitleBar () );
}
#endif
Main_MacHelper.mm (181 Bytes)
Main_WinHelper.cpp (1.1 KB)
3 Likes