]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/textctrl.cpp
build fix for !wxUSE_THREADS
[wxWidgets.git] / src / msw / textctrl.cpp
index d57e3eca0bde4bb9ae83a3465b8e5c88ed9d38e6..412c7a551aa12aec0f65b7b8906ffbe512b95c15 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;
 
@@ -2410,9 +2410,12 @@ bool wxTextCtrl::SetStyle(long start, long end, const wxTextAttr& style)
         // the real height in twips and not the negative number which
         // wxFillLogFont() returns (this is correct in general and works with
         // the Windows font mapper, but not here)
+
+        wxFont font(style.GetFont());
+
         LOGFONT lf;
-        wxFillLogFont(&lf, &style.GetFont());
-        cf.yHeight = 20*style.GetFont().GetPointSize(); // 1 pt = 20 twips
+        wxFillLogFont(&lf, &font);
+        cf.yHeight = 20*font.GetPointSize(); // 1 pt = 20 twips
         cf.bCharSet = lf.lfCharSet;
         cf.bPitchAndFamily = lf.lfPitchAndFamily;
         wxStrncpy( cf.szFaceName, lf.lfFaceName, WXSIZEOF(cf.szFaceName) );