Skip to content

Commit

Permalink
Update WndMain.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
Margen67 committed Dec 17, 2024
1 parent 8453f85 commit c463c89
Showing 1 changed file with 12 additions and 15 deletions.
27 changes: 12 additions & 15 deletions src/gui/WndMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -325,21 +325,18 @@ LRESULT CALLBACK WndMain::WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lP
ChangeWindowMessageFilterEx(hwnd, WM_COPYDATA, MSGFLT_ALLOW, nullptr);
ChangeWindowMessageFilterEx(hwnd, 0x0049, MSGFLT_ALLOW, nullptr);

if (hwnd)
{
// 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));

SetMenu(hwnd, hMenu);
}
}
m_bCreated = true;
}
// 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));

SetMenu(hwnd, hMenu);
}
m_bCreated = true;
}
break;

// NOTE: WM_PARENTNOTIFY was triggered by kernel process' graphic window creation.
Expand Down

0 comments on commit c463c89

Please sign in to comment.