]> git.saurik.com Git - wxWidgets.git/commitdiff
Don't clear the HWND until after the UnsubclassWin so the old WndProc
authorRobin Dunn <robin@alldunn.com>
Mon, 10 Mar 2003 23:32:18 +0000 (23:32 +0000)
committerRobin Dunn <robin@alldunn.com>
Mon, 10 Mar 2003 23:32:18 +0000 (23:32 +0000)
will be restored.  Otherwise we get messages after the wxTextCtrl has
been destroyed.  (Forgot a few last time)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19543 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/listctrl.cpp

index 8bc9ae2f26adaad9f392f2f6ec3f03c11ceeba1f..90a2e5fb8c9cbc1a3fea7dd30c8416e89dadaf14 100644 (file)
@@ -1299,8 +1299,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;
     }
 
@@ -2152,8 +2152,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;
             }