Use the dwmapi to disable rounded corners on Windows 11.

Hopefully just ignored on lower windows versions...
This commit is contained in:
Henrik Rydgård committed 2024-04-28 14:27:58 +02:00
1 parent 1786a4ddb0
commit 2cb3bd1cbe
2 files changed
+13 -8

No files matched your search

+5
View File
@@ -29,6 +29,7 @@
#include <shellapi.h>
#include <commctrl.h>
#include <string>
#include <dwmapi.h>
#include "Common/System/Display.h"
#include "Common/System/NativeApp.h"
@@ -483,6 +484,10 @@ namespace MainWindow
SetWindowLong(hwndMain, GWL_EXSTYLE, WS_EX_APPWINDOW);
const DWM_WINDOW_CORNER_PREFERENCE pref = DWMWCP_DONOTROUND;
DwmSetWindowAttribute(hwndMain, DWMWA_WINDOW_CORNER_PREFERENCE, &pref, sizeof(pref));
RECT rcClient;
GetClientRect(hwndMain, &rcClient);