-/*
- // Debugging
- wxDebugMsg("Edit control %d: ", (int)id);
- switch (param)
- {
- case EN_SETFOCUS:
- wxDebugMsg("EN_SETFOCUS\n");
- break;
- case EN_KILLFOCUS:
- wxDebugMsg("EN_KILLFOCUS\n");
- break;
- case EN_CHANGE:
- wxDebugMsg("EN_CHANGE\n");
- break;
- case EN_UPDATE:
- wxDebugMsg("EN_UPDATE\n");
- break;
- case EN_ERRSPACE:
- wxDebugMsg("EN_ERRSPACE\n");
- break;
- case EN_MAXTEXT:
- wxDebugMsg("EN_MAXTEXT\n");
- break;
- case EN_HSCROLL:
- wxDebugMsg("EN_HSCROLL\n");
- break;
- case EN_VSCROLL:
- wxDebugMsg("EN_VSCROLL\n");
- break;
- default:
- wxDebugMsg("Unknown EDIT notification\n");
- break;
- }
-*/
- switch (param)
- {
- case EN_SETFOCUS:
- case EN_KILLFOCUS:
- {
- wxFocusEvent event(param == EN_KILLFOCUS ? wxEVT_KILL_FOCUS
- : wxEVT_SET_FOCUS,
- m_windowId);
- event.SetEventObject( this );
- GetEventHandler()->ProcessEvent(event);
- }
- break;
-
- case EN_CHANGE:
- {
- wxCommandEvent event(wxEVT_COMMAND_TEXT_UPDATED, m_windowId);
- wxString val(GetValue());
- if ( !val.IsNull() )
- event.m_commandString = WXSTRINGCAST val;
- event.SetEventObject( this );
- ProcessCommand(event);
- }
- break;
-
- // the other notification messages are not processed
- case EN_UPDATE:
- case EN_ERRSPACE:
- case EN_MAXTEXT:
- case EN_HSCROLL:
- case EN_VSCROLL:
- default:
- return FALSE;
- }
+#ifndef __WIN16__
+ unsigned int len = ::GetWindowTextLength(GetHwnd()),
+ limit = ::SendMessage(GetHwnd(), EM_GETLIMITTEXT, 0, 0);
+ if ( len > limit )
+ {
+ limit = len + 0x8000; // 32Kb