Detect if a window has curved corners?
Posted: Tue Apr 09, 2024 8:10 am
Hi guys. I'm testing my app on Win 11 and of course it's thrown me a curve ball because Win 11 has stupid curved window corners now. 
So, my app draws a nice line across the top of any given third-party window, which now looks stupid because the start and end of the line is not above anything anymore due to the top-left and top-right corners being round.
I can work around that if I start the line 10 pixels right and end it 20 pixels from the right side of the window, but then for borderless apps (Winamp!) the line doesn't flow across the whole window anymore.
As you can tell, I'd rather do the line dynamically depending if the window has curved corners or not. Anyone know how? I tried searching Google but it keeps coming up with ways to disable curved corners on Win 11, which isn't what I want.

So, my app draws a nice line across the top of any given third-party window, which now looks stupid because the start and end of the line is not above anything anymore due to the top-left and top-right corners being round.
I can work around that if I start the line 10 pixels right and end it 20 pixels from the right side of the window, but then for borderless apps (Winamp!) the line doesn't flow across the whole window anymore.
As you can tell, I'd rather do the line dynamically depending if the window has curved corners or not. Anyone know how? I tried searching Google but it keeps coming up with ways to disable curved corners on Win 11, which isn't what I want.