diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index 850ea6ee93..4e2171fbfe 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -1951,6 +1951,9 @@ WXLRESULT wxTextCtrl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lPara // live with it. lRc = lDlgCode; } + if (IsMultiLine()) + // Clear the DLGC_HASSETSEL bit from the return value + lRc &= ~DLGC_HASSETSEL; } break; diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 3bdd324931..5e2e43a438 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -3100,13 +3100,6 @@ wxWindowMSW::MSWHandleMessage(WXLRESULT *result, processed = true; } - else if (IsOfStandardClass() && IsKindOf(CLASSINFO(wxTextCtrl)) && ((wxTextCtrl*)this)->IsMultiLine()) - { - rc.result = MSWDefWindowProc(message, wParam, lParam); - // Clear the DLGC_HASSETSEL bit from the return value - rc.result &= ~DLGC_HASSETSEL; - processed = true; - } //else: get the dlg code from the DefWindowProc() break;