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 76a9787 commit ccc4fb3
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions src/gui/WndMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -259,16 +259,19 @@ 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));
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);
}
SetMenu(hwnd, hMenu);
}
}

// Set window size to GUI dimensions
ResizeWindow(hwnd, /*bForGUI=*/true);
Expand Down

0 comments on commit ccc4fb3

Please sign in to comment.