X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c13219d6a850e42849d6e29f3bbf118dad57f889..e715f4e791fca58d82b01a973807aa0cd866c99f:/src/stc/stc.cpp diff --git a/src/stc/stc.cpp b/src/stc/stc.cpp index bda10615e5..0a8ccd6bc1 100644 --- a/src/stc/stc.cpp +++ b/src/stc/stc.cpp @@ -951,7 +951,8 @@ int wxStyledTextCtrl::FindText(int minPos, int maxPos, TextToFind ft; ft.chrg.cpMin = minPos; ft.chrg.cpMax = maxPos; - ft.lpstrText = (char*)(const char*)wx2stc(text); + wxWX2MBbuf buf = (wxWX2MBbuf)wx2stc(text); + ft.lpstrText = (char*)(const char*)buf; return SendMsg(2150, flags, (long)&ft); } @@ -1876,6 +1877,7 @@ void wxStyledTextCtrl::OnSize(wxSizeEvent& evt) { } void wxStyledTextCtrl::OnMouseLeftDown(wxMouseEvent& evt) { + SetFocus(); wxPoint pt = evt.GetPosition(); m_swx->DoButtonDown(Point(pt.x, pt.y), m_stopWatch.Time(), evt.ShiftDown(), evt.ControlDown(), evt.AltDown());