Skip to content

Commit

Permalink
Disable rounded corners
Browse files Browse the repository at this point in the history
  • Loading branch information
Margen67 committed Dec 16, 2024
1 parent 50334cb commit 5443271
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/gui/WndMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@
#undef GetSystemMetrics // Force remove DirectX 8's multimon.h defined function (redirect to xGetSystemMetrics).
#include <WinUser.h> // For GetSystemMetrics

#include <dwmapi.h>

#include <io.h>
#include <shlobj.h>

Expand Down Expand Up @@ -257,6 +259,10 @@ LRESULT CALLBACK WndMain::WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lP
{
case WM_CREATE:
{
// Remove rounded corners from the render window on Windows 11
const DWM_WINDOW_CORNER_PREFERENCE corner_preference = DWMWCP_DONOTROUND;
DwmSetWindowAttribute(hwnd, DWMWA_WINDOW_CORNER_PREFERENCE, &corner_preference,
sizeof(corner_preference));
// initialize menu
{
HMENU hMenu = LoadMenu(m_hInstance, MAKEINTRESOURCE(IDR_MAINMENU));
Expand Down

0 comments on commit 5443271

Please sign in to comment.