diff --git a/docs/changes.txt b/docs/changes.txt index 1bfcf05b02..2b53227ba1 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -470,6 +470,8 @@ MSW: - Added wxGCDC(wxEnhMetaFileDC) ctor (Marcin Wojdyr). - Added wxTopLevelWindow::MSWGetSystemMenu(). +- Multiline text controls no longer select all content when gaining focus from + the keyboard. 2.9.2: (released 2011-07-05) diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 5e2e43a438..3bdd324931 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -3100,6 +3100,13 @@ 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;