From: Vadim Zeitlin Date: Sun, 21 Apr 2002 00:32:56 +0000 (+0000) Subject: fixed WM_GETDLGCODE processing to include the bits returned by the DefWindowProc... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/e7e91e03584a8e2582e7efd32a06f9f79ef65a52 fixed WM_GETDLGCODE processing to include the bits returned by the DefWindowProc() as well; removed unneeded SetFocus() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15225 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/msw/textctrl.h b/include/wx/msw/textctrl.h index 07fa37fe8b..c5e03295f3 100644 --- a/include/wx/msw/textctrl.h +++ b/include/wx/msw/textctrl.h @@ -128,7 +128,6 @@ public: // Implementation from now on // -------------------------- - virtual void SetFocus(); virtual void SetWindowStyleFlag(long style); virtual void Command(wxCommandEvent& event); diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index 2e7893955d..24af3187f6 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -1217,6 +1217,8 @@ void wxTextCtrl::OnChar(wxKeyEvent& event) long wxTextCtrl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) { + long lRc = wxTextCtrlBase::MSWWindowProc(nMsg, wParam, lParam); + if ( nMsg == WM_GETDLGCODE ) { // we always want the chars and the arrows @@ -1238,24 +1240,10 @@ long wxTextCtrl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) if ( HasFlag(wxTE_PROCESS_TAB) ) lDlgCode |= DLGC_WANTTAB; - return lDlgCode; + lRc |= lDlgCode; } - return wxTextCtrlBase::MSWWindowProc(nMsg, wParam, lParam); -} - -void wxTextCtrl::SetFocus() -{ - wxTextCtrlBase::SetFocus(); - - // to be consistent with the standard Windows behaviour we select all text - // in the single line edit controls when the user TABs to them and also, to - // be consistent with this behaviour in turn, do it whenever SetFocus() is - // called as well - if ( !HasFlag(wxTE_MULTILINE) ) - { - SetSelection(-1, -1); - } + return lRc; } // ----------------------------------------------------------------------------