本文整理汇总了C++中Row::GetTabCount方法的典型用法代码示例。如果您正苦于以下问题:C++ Row::GetTabCount方法的具体用法?C++ Row::GetTabCount怎么用?C++ Row::GetTabCount使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Row
的用法示例。
在下文中一共展示了Row::GetTabCount方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AddRow
void EGridCtrl::AddRow( IGridRow* pRowHost )
{
//
// collect properties (columns) for the row
//
Row* pRow = new Row( pRowHost );
pRowHost->GetGridColumns( *pRow );
pRowHost->m_pGridCtrl = this;
//
// prepare the dc for size calculations
//
CDC* pDC = GetDC();
pDC->SelectObject( &m_Font );
//
//
//
pRow->m_nHeight = GetRowHeight( pRow , pDC );
m_vRows.push_back( pRow );
//
// update column list
//
std::list<Row*>::iterator iter = m_vRows.begin();
std::list<Row*>::iterator iend = m_vRows.end();
while( iter != iend ) //for all rows...
{
Row* pRow = *iter;
ASSERT( pRow->GetTabCount()==1 );
ASSERT( pRow->GetActiveTab()==0 );
int n = pRow->Size();
for( int i=0 ; i<n ; i++ )
{
EProperty* pProperty = pRow->Get(i);
int m = EIconTextButtonProperty::s_nMargin;
CString sName = pProperty->GetName();
Column* pColumn = GetColumn( sName , true , m + pDC->GetTextExtent(sName).cx + m );
pColumn->EnsureWidth( pProperty->GetPreferedWidth(pDC) );
}
iter++;
}
ReleaseDC(pDC);
//
// calculate left of each column
//
RefreshColumnLefts( m_ViewportOrg.x );
RefreshRowTops( m_ViewportOrg.y );
//
//
//
BuildPropertyMap();
//
//
//
Invalidate();
}
示例2: DoPaint
//.........这里部分代码省略.........
//
// EProperty* pProperty = pRow->GetProperty( pColumn->m_sName );
//
// if( pProperty != NULL )
// {
// r.left = pColumn->m_nLeft;
// r.right = pColumn->m_nLeft + pColumn->m_nWidth;
// pProperty->Draw( &dc , this , &r );
// }
//
//
//
// coliter++;
// }
//
// r.top = r.bottom + m_nColumnSeperatorWidth;
//
// iter++;
// }
//--------
CRect r( 0 , 0 ,0 , 0 );
std::list<Row*>::iterator iter = m_vRows.begin();
std::list<Row*>::iterator iend = m_vRows.end();
EProperty** ppMap = m_ppPropertyMap;
while( iter != iend )
{
Row* pRow = *iter;
ASSERT( pRow->GetTabCount()==1 );
ASSERT( pRow->GetActiveTab()==0 );
r.top = pRow->m_nTop;
r.bottom = pRow->m_nTop + pRow->m_nHeight;
coliter = m_vCols.begin();
coliend = m_vCols.end();
while( coliter != coliend )
{
Column* pColumn = *coliter;
EProperty* pProperty = *ppMap; //pRow->GetProperty( pColumn->m_sName );
if( pProperty != NULL )
{
r.left = pColumn->m_nLeft;
r.right = pColumn->m_nLeft + pColumn->m_nWidth;
pProperty->m_Rect = r;
pProperty->Draw( pDC , this );
}
ppMap++;
coliter++;
}
r.top = r.bottom + m_nColumnSeperatorWidth;
iter++;
}