wxTreeCtrl::~wxTreeCtrl()
{
+ m_isBeingDeleted = true;
+
// delete any attributes
if ( m_hasAnyAttr )
{
//
// to avoid such surprises, we force the generation of focus events
// now, before we generate the selection change ones
- if ( !m_changingSelection )
+ if ( !m_changingSelection && !m_isBeingDeleted )
SetFocus();
break;
case NM_RCLICK:
{
TV_HITTESTINFO tvhti;
- ::GetCursorPos(&tvhti.pt);
+ wxGetCursorPosMSW(&tvhti.pt);
::ScreenToClient(GetHwnd(), &tvhti.pt);
if ( TreeView_HitTest(GetHwnd(), &tvhti) )
{