From c59147ba270a08e12089b59a1bacce9effea88a8 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 7 Aug 1998 22:15:31 +0000 Subject: [PATCH] WM_GETDLGCODE handling correctly implemented git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@460 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/textctrl.cpp | 36 +++--------------------------------- 1 file changed, 3 insertions(+), 33 deletions(-) diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index a238418265..5fc6c3e2ad 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -942,44 +942,14 @@ void wxTextCtrl::OnChar(wxKeyEvent& event) long wxTextCtrl::MSWGetDlgCode() { long lRc = DLGC_WANTCHARS | DLGC_WANTARROWS; - if ( m_windowStyle & wxPROCESS_ENTER ) { + if ( m_windowStyle & wxPROCESS_ENTER ) + lRc |= DLGC_WANTMESSAGE; + else if ( m_windowStyle & wxTE_MULTILINE ) lRc |= DLGC_WANTMESSAGE; - } return lRc; } -/* -long wxTextCtrl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) -{ - switch (nMsg) - { - case WM_GETDLGCODE: - { - if (GetWindowStyleFlag() & wxPROCESS_ENTER) - return DLGC_WANTALLKEYS; - break; - } - case WM_CHAR: // Always an ASCII character - { - if (wParam == VK_RETURN) - { - wxCommandEvent event(wxEVENT_TYPE_TEXT_ENTER_COMMAND); - event.commandString = ((wxTextCtrl *)item)->GetValue(); - event.eventObject = item; - item->ProcessCommand(event); - return FALSE; - } - break; - } - default: - break; - } - - return wxWindow::MSWWindowProc(nMsg, wParam, lParam); -} -*/ - void wxTextCtrl::OnEraseBackground(wxEraseEvent& event) { if ( m_windowStyle & wxTE_MULTILINE ) -- 2.45.2