According to Apply rounded corners in desktop apps for Windows 11 "By design, apps are not rounded when maximized, snapped, running in a Virtual Machine (VM), running on a Windows Virtual Desktop (WVD), or running as a Windows Defender Application Guard (WDAG) window." That would explain why your snapped window does not have rounded corners.
How to check rounded corner?

Hi, I'm using the following code to check rounded on win11.
DWM_WINDOW_CORNER_PREFERENCE preference ;
DwmGetWindowAttribute(hwnd,WINDOW_CORNER_PREFERENCE, ref preference , sizeof(uint));
However it doesn't work as expected. I used window + left arrow to align it, clearly its state at this time is perpendicular.
However preference always returns 2.
Is there any other way to fix it?
Thanks you!
Windows development | Windows API - Win32
Developer technologies | .NET | Other
1 additional answer
Sort by: Most helpful
-
Michael Taylor 60,331 Reputation points
2024-02-05T19:43:37.27+00:00 The call returns the preference, not whether it actually is or not. As discussed in the docs for having rounded corners here a snapped window doesn't have rounded corners whether its preference was to have them or not. There are quite a few other situations where rounding isn't supported even if the preference is to have it.
AFAIK there isn't a way to determine if the corners are actually rounded on a window or not. I guess you could brute force a solution but since it is part of the chrome then I'm not sure it'll work. Windows still sees it as a rectangle. You might be able to look at the window styles but I think you'd need to run Spy++ to see if there is a difference. I've never looked.