]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/textctrl.cpp
call Create from wxGrid non-default ctor instead to ensure both methods of creation...
[wxWidgets.git] / src / msw / textctrl.cpp
index 16a0ef075be6c3e8823ebf8f325f708ae5257b63..0a8e54ea59d3f5459221219848a130458ae2b5bb 100644 (file)
@@ -1307,7 +1307,7 @@ void wxTextCtrl::DoSetSelection(long from, long to, int flags)
     else
 #endif // wxUSE_RICHEDIT
     {
-        ::SendMessage(hWnd, EM_SETSEL, from, to);
+        wxTextEntry::DoSetSelection(from, to, flags);
     }
 
     if ( (flags & SetSel_Scroll) && !IsFrozen() )
@@ -1784,7 +1784,7 @@ void wxTextCtrl::OnChar(wxKeyEvent& event)
                 wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId);
                 InitCommandEvent(event);
                 event.SetString(GetValue());
-                if ( GetEventHandler()->ProcessEvent(event) )
+                if ( HandleWindowEvent(event) )
                 if ( !HasFlag(wxTE_MULTILINE) )
                     return;
                 //else: multiline controls need Enter for themselves
@@ -1935,7 +1935,7 @@ bool wxTextCtrl::MSWCommand(WXUINT param, WXWORD WXUNUSED(id))
                                                          : wxEVT_SET_FOCUS,
                                    m_windowId);
                 event.SetEventObject(this);
-                GetEventHandler()->ProcessEvent(event);
+                HandleWindowEvent(event);
             }
             break;
 
@@ -2141,13 +2141,15 @@ void wxTextCtrl::OnContextMenu(wxContextMenuEvent& event)
     event.Skip();
 }
 
-void wxTextCtrl::OnSetFocus(wxFocusEvent& WXUNUSED(event))
+void wxTextCtrl::OnSetFocus(wxFocusEvent& event)
 {
     // be sure the caret remains invisible if the user had hidden it
     if ( !m_isNativeCaretShown )
     {
         ::HideCaret(GetHwnd());
     }
+
+    event.Skip();
 }
 
 // ----------------------------------------------------------------------------