Don't clear the HWND until after the UnsubclassWin so the old WndProc

will be restored.  Otherwise we get messages after the wxTextCtrl has
been destroyed.  (backport)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19544 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2003-03-10 23:33:47 +00:00
parent ef5d4fc7e0
commit 8774540e37

View File

@@ -412,8 +412,8 @@ wxListCtrl::~wxListCtrl()
if ( m_textCtrl )
{
m_textCtrl->SetHWND(0);
m_textCtrl->UnsubclassWin();
m_textCtrl->SetHWND(0);
delete m_textCtrl;
m_textCtrl = NULL;
}
@@ -1315,8 +1315,8 @@ wxTextCtrl* wxListCtrl::EditLabel(long item, wxClassInfo* textControlClass)
// [re]create the text control wrapping the HWND we got
if ( m_textCtrl )
{
m_textCtrl->SetHWND(0);
m_textCtrl->UnsubclassWin();
m_textCtrl->SetHWND(0);
delete m_textCtrl;
}
@@ -2163,8 +2163,8 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
{
// EDIT control will be deleted by the list control itself so
// prevent us from deleting it as well
m_textCtrl->SetHWND(0);
m_textCtrl->UnsubclassWin();
m_textCtrl->SetHWND(0);
delete m_textCtrl;
m_textCtrl = NULL;
}