]> git.saurik.com Git - wxWidgets.git/commitdiff
Implemented non-selection of content when setting focus via the keyboard.
authorJulian Smart <julian@anthemion.co.uk>
Tue, 16 Aug 2011 20:52:15 +0000 (20:52 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Tue, 16 Aug 2011 20:52:15 +0000 (20:52 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68749 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/changes.txt
src/msw/window.cpp

index 1bfcf05b0276fcc131db5adc7633c47eab27f6c5..2b53227ba1e9785384d4bd9981a12de04d07b520 100644 (file)
@@ -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)
index 5e2e43a438aeb3282ecd2e8adabfc551c7175815..3bdd3249315977c6c563c2f2f0f8959a7229427e 100644 (file)
@@ -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;