X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e702ff0f08a54622a6b0f1e2ec39537b082c3a8e..dabc0cd5c1c89f731d818d5d2cfa03bfff8a9db7:/src/msw/textctrl.cpp?ds=sidebyside diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index 630fc27176..7388f2817e 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -74,7 +74,6 @@ IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl, wxControl) BEGIN_EVENT_TABLE(wxTextCtrl, wxControl) EVT_CHAR(wxTextCtrl::OnChar) EVT_DROP_FILES(wxTextCtrl::OnDropFiles) - EVT_ERASE_BACKGROUND(wxTextCtrl::OnEraseBackground) EVT_MENU(wxID_CUT, wxTextCtrl::OnCut) EVT_MENU(wxID_COPY, wxTextCtrl::OnCopy) @@ -1070,7 +1069,7 @@ WXHBRUSH wxTextCtrl::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, void wxTextCtrl::OnChar(wxKeyEvent& event) { - switch( event.KeyCode() ) + switch ( event.KeyCode() ) { case WXK_RETURN: if ( !(m_windowStyle & wxTE_MULTILINE) ) @@ -1111,8 +1110,9 @@ void wxTextCtrl::OnChar(wxKeyEvent& event) // don't just call event.Skip() because this will cause TABs and ENTERs // be passed upwards and we don't always want this - instead process it // right here - Default(); -// event.Skip(); + + // FIXME + event.Skip(); } long wxTextCtrl::MSWGetDlgCode() @@ -1135,27 +1135,6 @@ long wxTextCtrl::MSWGetDlgCode() return lRc; } -void wxTextCtrl::OnEraseBackground(wxEraseEvent& event) -{ - if ( m_windowStyle & wxTE_MULTILINE ) - { - // No flicker - only problem is we probably can't change the background - Default(); -/* - RECT rect; - ::GetClientRect((HWND) GetHWND(), &rect); - - HBRUSH hBrush = ::CreateSolidBrush(PALETTERGB(GetBackgroundColour().Red(), GetBackgroundColour().Green(), GetBackgroundColour().Blue())); - int mode = ::SetMapMode((HDC) event.GetDC()->GetHDC(), MM_TEXT); - - ::FillRect ((HDC) event.GetDC()->GetHDC(), &rect, hBrush); - ::DeleteObject(hBrush); - ::SetMapMode((HDC) event.GetDC()->GetHDC(), mode); -*/ - } -// wxWindow::OnEraseBackground(event); -} - bool wxTextCtrl::MSWCommand(WXUINT param, WXWORD WXUNUSED(id)) { /* @@ -1234,7 +1213,7 @@ bool wxTextCtrl::MSWCommand(WXUINT param, WXWORD WXUNUSED(id)) // For Rich Edit controls. Do we need it? #if 0 #if wxUSE_RICHEDIT -bool wxTextCtrl::MSWNotify(WXWPARAM wParam, WXLPARAM lParam) +bool wxTextCtrl::MSWOnNotify(WXWPARAM wParam, WXLPARAM lParam) { wxCommandEvent event(0, m_windowId); int eventType = 0; @@ -1243,7 +1222,7 @@ bool wxTextCtrl::MSWNotify(WXWPARAM wParam, WXLPARAM lParam) { // Insert case code here default : - return wxControl::MSWNotify(wParam, lParam); + return wxControl::MSWOnNotify(wParam, lParam); break; }