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 8073c8b commit c85ce6f
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions src/gui/WndMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -319,21 +319,21 @@ 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);

m_bCreated = true;
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);
}
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;
break;

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

0 comments on commit c85ce6f

Please sign in to comment.