Can't get rid of small black border of DocumentWindow

Hi all,

does anybody know, how to get rid of the DocumentWindow/ResizableWindow border. I try to make a Application with rounded corners and title bar. Everything works well, but I have no chance to make soft borders.

I tried to set a transparent background of DocumentWindow. It works, but I have still a small black border.


You’d need to look at LookAndFeel::drawResizableWindowBorder(), I’d have thought…

Hi Jules,

many thanks to that. My Partner who is familiar with Windows Programming founds a solution to get round corners:

centreWithSize (APP_WIDTH, APP_HEIGHT);
setTitleBarButtonsRequired(minimiseButton | closeButton ,false);
setResizable(FALSE, FALSE);
HRGN rgn = CreateRoundRectRgn(0,0,getWidth()+1,getHeight(),20,20);
SetWindowRgn((HWND) this->getWindowHandle(), rgn, TRUE);
setVisible (true);

For Mac I am still searching to get round corners with title bar.


LookAndFeel::drawResizableWindowBorder() does not solve the problem.

How do you get rid of the 1 pixel border on a DocumentWindow without going to Windows/Mac os code?

Never mind I figured it out.

For proper rounded corners you'd need to make your window non-opaque. That'll work nicely on OSX but on windows there's a performance hit due to the way that win32 bodged support for window transparency.