本文整理汇总了C++中CGridCellBase::SetText方法的典型用法代码示例。如果您正苦于以下问题:C++ CGridCellBase::SetText方法的具体用法?C++ CGridCellBase::SetText怎么用?C++ CGridCellBase::SetText使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CGridCellBase
的用法示例。
在下文中一共展示了CGridCellBase::SetText方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DrawTitle
void QuoteTableCtrlGeneralSort::DrawTitle()
{
CGridCellBase* pCell;
for (int col =0; col<GetColumnCount(); col++)
{
pCell = GetCell(0, col);
pCell->SetText("");
}
}
示例2: SetGridCtrlText
void CResiduePane::SetGridCtrlText()
{
CSTLArrayPDBRenderer & arrayPDBRenderer = m_pProteinVistaRenderer->m_arrayPDBRenderer;
if ( arrayPDBRenderer.size() == 0 )
return;
long vertIndex = 0;
for ( int iPDB = 0; iPDB < arrayPDBRenderer.size() ; iPDB++ )
{
CPDBInst * pPDBInst = arrayPDBRenderer[iPDB]->GetPDBInst();
for ( int iModel = 0 ; iModel < pPDBInst->m_arrayModelInst.size() ; iModel ++ )
{
CModelInst * pModelInst = pPDBInst->m_arrayModelInst[iModel];
long nChain = pModelInst->m_arrayChainInst.size();
for ( int iChain = 0 ; iChain < nChain ; iChain ++ )
{
CChainInst * pChainInst = pPDBInst->GetChainInst(iModel ,iChain);
CGridCellBase * pCell = m_residueGridCtrl->GetCell(vertIndex, 0 );
if ( pCell != NULL )
{
if ( pPDBInst->m_arrayModelInst.size() == 1 )
{
pCell->SetText(pChainInst->GetChain()->m_strPDBID);
}
else
{
CString strChain;
strChain.Format("[%d]%s", iModel, pChainInst->GetChain()->m_strPDBID);
pCell->SetText(strChain);
}
pCell->SetData((LPARAM)(pChainInst));
}
for ( int j = 0 ; j < pChainInst->m_arrayResidueInst.size() ; j++ )
{
CGridCellBase * pCell = m_residueGridCtrl->GetCell(vertIndex, j+1);
if ( pCell != NULL )
{
BOOL selectColor = 30;
long ss = pChainInst->m_arrayResidueInst[j]->GetResidue()->GetSS();
if ( ss == SS_NONE )
pCell->SetBackClr(RGB(min(180+selectColor,255), min(180+selectColor,255) , min(180+selectColor,255) ));
else if ( ss == SS_HELIX )
pCell->SetBackClr(RGB(min(180+selectColor,255), min(selectColor,255), min(selectColor,255) ));
else if ( ss == SS_SHEET )
pCell->SetBackClr(RGB(min(selectColor,255) ,min (180+selectColor, 255) ,min(selectColor,255) ));
CString strText;
CResidueInst * pResidueInst = pChainInst->m_arrayResidueInst[j];
if ( m_displayStyle == 0 )
strText.Format("%s" , pResidueInst->GetResidue()->m_residueNameOneChar);
if ( m_displayStyle == 1 )
strText.Format("%d %s" , pResidueInst->GetResidue()->GetResidueNum(), pResidueInst->GetResidue()->m_residueNameOneChar );
if ( m_displayStyle == 2 )
strText.Format("%d(%d) %s" , pResidueInst->GetResidue()->GetResidueNum(), j, pResidueInst->GetResidue()->m_residueNameOneChar );
if ( m_displayStyle == 3 )
strText.Format("%s" , pResidueInst->GetResidue()->GetResidueName() );
if ( m_displayStyle == 4 )
strText.Format("%d %s" , pResidueInst->GetResidue()->GetResidueNum(), pResidueInst->GetResidue()->GetResidueName() );
if ( m_displayStyle == 5 )
strText.Format("%d(%d) %s" , pResidueInst->GetResidue()->GetResidueNum(), j, pResidueInst->GetResidue()->GetResidueName() );
pCell->SetText(strText);
pCell->SetData((LPARAM)(pResidueInst));
}
}
vertIndex ++;
}
}
}
}