CXTPTabManagerItem* CXTPTabManager::FindNextFocusable(int nIndex, int nDirection) const { CXTPTabManagerItem* pItem = NULL; do { nIndex += nDirection; pItem = GetItem(nIndex); if (!pItem) return NULL; } while (!(pItem->IsVisible() && pItem->IsEnabled())); return pItem; }
CXTPTabManagerItem* CXTPTabManager::HitTest(CPoint point) const { if (!m_rcControl.PtInRect(point)) return NULL; if (!m_rcHeaderRect.IsRectEmpty() && !m_rcHeaderRect.PtInRect(point)) return NULL; for (int i = 0; i < GetItemCount(); i++) { CXTPTabManagerItem* pItem = GetItem(i); if (pItem->GetRect().PtInRect(point) && pItem->IsEnabled() && pItem->IsVisible()) { return pItem; } } return NULL; }