WM_GETDLGCODE handling correctly implemented

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@460 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 1998-08-07 22:15:31 +00:00
parent 44a6c8e618
commit c59147ba27

View File

@ -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 )