void CXTPRibbonGroup::RemoveAll() { for (int nIndex = (int)m_arrControls.GetSize() - 1; nIndex >= 0; nIndex--) { CXTPControl* pControl = m_arrControls.GetAt(nIndex); pControl->m_pRibbonGroup = NULL; m_arrControls.RemoveAt(nIndex); m_pParent->GetControls()->Remove(pControl); pControl->InternalRelease(); } }
void CXTPRibbonGroup::RemoveAt(int nIndex) { if (nIndex >= 0 && nIndex < GetCount()) { CXTPControl* pControl = m_arrControls.GetAt(nIndex); pControl->m_pRibbonGroup = NULL; m_arrControls.RemoveAt(nIndex); GetRibbonBar()->GetControls()->Remove(pControl); pControl->InternalRelease(); } }