From 31ae1f8094d1d3e0dec9223b10bc3ffedc44f351 Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Sat, 2 Jan 2021 10:20:12 +0100 Subject: [PATCH] Fix build with wxUSE_OLE==0 --- src/msw/textctrl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index 6e0aee5ae5..6f81e76593 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -690,7 +690,7 @@ bool wxTextCtrl::MSWCreateText(const wxString& value, ::SendMessage(GetHwnd(), EM_SETMARGINS, wParam, lParam); } -#if wxUSE_RICHEDIT && defined(wxHAS_TOM_H) +#if wxUSE_RICHEDIT && wxUSE_OLE && defined(wxHAS_TOM_H) // For RichEdit >= 4, SetFont(), called above from MSWCreateControl(), uses // EM_SETCHARFORMAT which affects the undo buffer, meaning that CanUndo() // for a newly created control returns true, which is unexpected. To avoid