Fix build with wxUSE_OLE==0

This commit is contained in:
Artur Wieczorek
2021-01-02 10:20:12 +01:00
parent faff721ef0
commit 31ae1f8094

View File

@@ -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