Reputation: 1585
I have a properly initialized object of CMFCTabCtrl in my application. I have added some tabs to it by
m_oMTC.AddTab(pTab, Name, -1, FALSE);
now I want to iterate over over all tabs in m_oMTC, get tabs handle and check some of it's child item. How can i do this?
I used this code for iterating
int nTabCnt = m_oMTC->GetTabsNum();
for (int i = 0; i < nTabCnt; i++)
{
m_oMTC->SetActiveTab(i);
}
Upvotes: 0
Views: 1274
Reputation: 4590
CMCFTabCtrl is derived from CMFCBaseTabCtrl. You should be using CMFCBaseTabCtrl::GetTabWnd to iterate through the child tabs within your loop. Depending on how you've set up the tabs, you may need to enumerate the child CWnds on the returned CWnd from GetTabWnd
.
Upvotes: 1