From 4f7c00f237b6308394adb074fc94a0de8e2391d5 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 18 Sep 2010 16:26:22 +0000 Subject: [PATCH] Set wxTextCtrl::m_verRichEdit to 4 for RichEdit 4.1. Set m_verRichEdit to a different value for the version 4.1 of the control as it behaves subtly differently from the previous versions. Also clarify that value of 2 is used for both 2.0 and 3.0 versions of the control. No real changes yet. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65563 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/msw/textctrl.h | 5 +++-- src/msw/textctrl.cpp | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/include/wx/msw/textctrl.h b/include/wx/msw/textctrl.h index ee8d91971f..af6ce10eaf 100644 --- a/include/wx/msw/textctrl.h +++ b/include/wx/msw/textctrl.h @@ -237,8 +237,9 @@ protected: #if wxUSE_RICHEDIT // we're using RICHEDIT (and not simple EDIT) control if this field is not - // 0, it also gives the version of the RICHEDIT control being used (1, 2 or - // 3 so far) + // 0, it also gives the version of the RICHEDIT control being used + // (although not directly: 1 is for 1.0, 2 is for either 2.0 or 3.0 as we + // can't nor really need to distinguish between them and 4 is for 4.1) int m_verRichEdit; #endif // wxUSE_RICHEDIT diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index c2417d2cc4..c941de8b57 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -434,6 +434,8 @@ bool wxTextCtrl::MSWCreateText(const wxString& value, { // yes, class name for version 4.1 really is 5.0 windowClass = wxT("RICHEDIT50W"); + + m_verRichEdit = 4; } else if ( wxRichEditModule::Load(wxRichEditModule::Version_2or3) ) {