Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
sdottaka committed Jun 28, 2024
1 parent 6aff599 commit ab0f599
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 0 additions & 4 deletions Src/Common/BCMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 2 additions & 0 deletions Src/Common/BCMenu.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 5 additions & 0 deletions Src/Merge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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());
Expand Down

0 comments on commit ab0f599

Please sign in to comment.