Fixed doubled-up key effects in wxTextCtrl by resetting m_lastMsg to 0

after calling Default().


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2027 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart 1999-04-02 19:05:02 +00:00
parent 511327386b
commit a0d8a30528

View File

@ -2047,7 +2047,13 @@ long wxWindow::Default()
wxGetMessageName(m_lastMsg));
#endif // __WXDEBUG__
return this->MSWDefWindowProc(m_lastMsg, m_lastWParam, m_lastLParam);
long ret = this->MSWDefWindowProc(m_lastMsg, m_lastWParam, m_lastLParam);
// The idea here is to prevent MSWDefWindowProc from being called twice,
// which it can be where OnChar/OnKeyDown are concerned (because OnChar is
// sometimes called in wxWin where it isn't in MSW)
m_lastMsg = 0;
return ret;
}
bool wxWindow::MSWProcessMessage(WXMSG* pMsg)
@ -3791,7 +3797,10 @@ void wxWindow::OnChar(wxKeyEvent& event)
id= m_lastWParam;
if ( !event.ControlDown() ) // Why this test?
(void) MSWDefWindowProc(m_lastMsg, (WPARAM) id, m_lastLParam);
{
if (m_lastMsg != 0)
(void) MSWDefWindowProc(m_lastMsg, (WPARAM) id, m_lastLParam);
}
}
void wxWindow::OnKeyDown(wxKeyEvent& event)