// When a box is deleted, make the corresponding VwAccessRoot (if any) invalid. void VwAccessRoot::BoxDeleted(VwBox * pbox) { IAccessiblePtr qacc; if (ViewsGlobals::m_hmboxacc->Retrieve(pbox, qacc)) { ViewsGlobals::m_hmboxacc->Delete(pbox); dynamic_cast<VwAccessRoot *>(qacc.Ptr())->m_pbox = NULL; } }