OutlookTabCtrl/OutlookTabCtrl.cpp
/////////////////////////////////////////////////////////////////////////////
// Correct order items and assign top and bottom visible stripes.
// 
Correct order items and assign top and bottom visible stripes.
Correct order items and assign top and bottom visible stripes .
void OutlookTabCtrl::Private::PrepareRecalc()
{	m_hTopVisibleStripe = m_hBottomVisibleStripe = nullptr;
	for(i_item i=m_items.begin(); i!=m_items.end(); ++i)
		if(!(*i)->visible)
			(*i)->button = false;
		else
			if(!(*i)->button)   this is stripe.
			{	if(!m_hTopVisibleStripe)
					m_hTopVisibleStripe = *i;
				m_hBottomVisibleStripe = *i;
			}
			else   this is the first button.
			{	for(++i; i!=m_items.end(); ++i)
					(*i)->button = true;
				break;
			}
}
void OutlookTabCtrl :: Private :: PrepareRecalc ( ) { m_hTopVisibleStripe = m_hBottomVisibleStripe = nullptr ; for ( i_item i = m_items . begin ( ) ; i != m_items . end ( ) ; ++ i ) if ( ! ( * i ) -> visible ) ( * i ) -> button = false ; else if ( ! ( * i ) -> button ) { if ( ! m_hTopVisibleStripe ) m_hTopVisibleStripe = * i ; m_hBottomVisibleStripe = * i ; } else { for ( ++ i ; i != m_items . end ( ) ; ++ i ) ( * i ) -> button = true ; break ; } }
Correct order items and assign top and bottom visible stripes.
Correct order items and assign top and bottom visible stripes .
//  // this is stripe. // this is the first button.