diff --git a/Src/Common/BCMenu.cpp b/Src/Common/BCMenu.cpp index 1404ce5fbe6..f276582c58a 100644 --- a/Src/Common/BCMenu.cpp +++ b/Src/Common/BCMenu.cpp @@ -51,11 +51,7 @@ int BCMenu::m_checkBgWidth = 0; int BCMenu::m_gutterWidth = 0; int BCMenu::m_arrowWidth = 0; HTHEME BCMenu::m_hTheme = nullptr; -#ifdef _WIN64 -bool BCMenu::m_bEnableOwnerDraw = false; -#else bool BCMenu::m_bEnableOwnerDraw = true; -#endif static class GdiplusToken { diff --git a/Src/Common/BCMenu.h b/Src/Common/BCMenu.h index 70c33fcec97..9552bb437cc 100644 --- a/Src/Common/BCMenu.h +++ b/Src/Common/BCMenu.h @@ -58,6 +58,8 @@ class BCMenu : public CMenu BCMenu(); virtual ~BCMenu(); + static void DisableOwnerDraw() { m_bEnableOwnerDraw = false; } + // Functions for loading and applying bitmaps to menus (see example application) virtual BOOL LoadMenu(LPCTSTR lpszResourceName); virtual BOOL LoadMenu(int nResource) diff --git a/Src/Merge.cpp b/Src/Merge.cpp index c92a96680bb..93c4709cf33 100644 --- a/Src/Merge.cpp +++ b/Src/Merge.cpp @@ -62,6 +62,8 @@ #include "OptionsProject.h" #include "MergeAppCOMClass.h" #include "RegKey.h" +#include "Win_VersionHelper.h" +#include "BCMenu.h" #ifdef _DEBUG #define new DEBUG_NEW @@ -402,6 +404,9 @@ BOOL CMergeApp::InitInstance() strdiff::Init(); // String diff init strdiff::SetBreakChars(GetOptionsMgr()->GetString(OPT_BREAK_SEPARATORS).c_str()); + if (IsWin11_OrGreater()) + BCMenu::DisableOwnerDraw(); + m_bMergingMode = GetOptionsMgr()->GetBool(OPT_MERGE_MODE); m_mainThreadScripts = new CAssureScriptsForThread(new MergeAppCOMClass());