本文整理汇总了C++中CGridCellBase::GetText方法的典型用法代码示例。如果您正苦于以下问题:C++ CGridCellBase::GetText方法的具体用法?C++ CGridCellBase::GetText怎么用?C++ CGridCellBase::GetText使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CGridCellBase
的用法示例。
在下文中一共展示了CGridCellBase::GetText方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SaveParse
void GMassMobAppearGrid::SaveParse(GStageLevel* pStage)
{
CGridCellBase* cell = NULL;
GtLongNumberString num;
for( gint i = 1 ; i < GetRowCount() ; i++ )
{
GStageLevel::MassAppearMob mob;
cell = GetCell( i, 0 );
num.SetNumber( (gtchar*)cell->GetText() );
mob.mIndex = (guint32)num.GetNumber( 0 );
cell = GetCell( i, 1 );
num.SetNumber( (gtchar*)cell->GetText() );
mob.mLevel = (guint32)num.GetNumber( 0 );
cell = GetCell( i, 2 );
num.SetNumber( (gtchar*)cell->GetText() );
mob.mNumLine = (guint32)num.GetNumber( 0 );
cell = GetCell( i, 3 );
num.SetNumber( (gtchar*)cell->GetText() );
mob.mNumMobCount = (guint32)num.GetNumber( 0 );
pStage->AddMassAppearMob( mob );
}
}
示例2: OnNotify
/******************************************************************************
@author humkyung
@date 2012-07-10
@class CBusToBusView
@function OnNotify
@return BOOL
@param WPARAM wParam
@param LPARAM lParam
@param LRESULT* pResult
@brief
******************************************************************************/
BOOL CBusToBusView::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult)
{
if(wParam == m_wndGridCtrl.GetDlgCtrlID())
{
NM_GRIDVIEW* pGridView = (NM_GRIDVIEW*)(lParam);
if((GVN_ENDLABELEDIT == pGridView->hdr.code) && (1 == pGridView->iColumn))
{
CGridCellBase* pCell = m_wndGridCtrl.GetCell(pGridView->iRow, pGridView->iColumn);
CString sFromBus = pCell->GetText();
CGridCellBusCombo* pBusCombo = (CGridCellBusCombo*)m_wndGridCtrl.GetCell(pGridView->iRow, pGridView->iColumn + 1);
CString sToBus = pBusCombo->GetText();
if(sFromBus == sToBus)
{
AfxMessageBox(_T("From and To Bus are same") , MB_OK | MB_ICONWARNING);
m_wndGridCtrl.SetSelectedRange(pGridView->iRow , pGridView->iColumn,pGridView->iRow , pGridView->iColumn);
m_wndGridCtrl.SetFocusCell(pGridView->iRow , pGridView->iColumn);
return TRUE;
}
pBusCombo->m_sFromBus = sFromBus;
GetDocument()->SetModifiedFlag(TRUE);
}
return TRUE;
}
return CView::OnNotify(wParam, lParam, pResult);
}
示例3: MultiCompare
/**
@brief
@author
*/
int CGridCtrlEx::MultiCompare(const int& lhs, const int& rhs)
{
int nIndex = 0;
for(vector<int>::iterator itr = m_MultiSortCellNoEntry.begin();itr != m_MultiSortCellNoEntry.end();++itr,++nIndex)
{
if(-1 == (*itr)) continue;
CGridCellBase* pLhsCell = GetCell(lhs , *itr);
CGridCellBase* pRhsCell = GetCell(rhs , *itr);
int res = _tcscmp(pLhsCell->GetText() , pRhsCell->GetText());
if(0 != res)
{
return (0 == m_MultiSortDirEntry[nIndex]) ? res : -res;
}
}
return 0;
}
示例4: SetGrid
void CGridCellBase::operator=(const CGridCellBase& cell)
{
SetGrid(cell.GetGrid()); // do first in case of dependencies
SetText(cell.GetText());
SetImage(cell.GetImage());
SetData(cell.GetData());
SetState(cell.GetState());
SetFormat(cell.GetFormat());
SetTextClr(cell.GetTextClr());
SetBackClr(cell.GetBackClr());
SetFont(cell.IsDefaultFont()? NULL : cell.GetFont());
SetMargin(cell.GetMargin());
}
示例5: OnBtnMergeClicked
void CDBSchemaTableView::OnBtnMergeClicked()
{
int iSelectedRowCount = 0;
int iSelectedRows[2];
for(int i = GRIDHEADERROWCOUNT; i < GridTab.GetRowCount(); ++i)
{
CGridCellBase* pCell = GridTab.GetCell(i, 0);
if(CEditStyleBool::GetInstance().strTrue == pCell->GetText())
{
iSelectedRows[iSelectedRowCount++] = i - GRIDHEADERROWCOUNT;
if(iSelectedRowCount >= 2) break;
}
}
if(iSelectedRowCount == 2)
{
GetDocument()->MergeTable(iSelectedRows[0], iSelectedRows[1]);
}
iSelectedRowCount = 0;
for(int i = GRIDHEADERROWCOUNT; i < GridCol.GetRowCount(); ++i)
{
CGridCellBase* pCell = GridCol.GetCell(i, 0);
TTRACE(pCell->GetText());
if(CEditStyleBool::GetInstance().strTrue == pCell->GetText())
{
iSelectedRows[iSelectedRowCount++] = i - GRIDHEADERROWCOUNT;
if(iSelectedRowCount >= 2) break;
}
}
if(iSelectedRowCount == 2)
{
GetDocument()->MergeColumn(GridTabViewer.GetCurRecord(0), iSelectedRows[0], iSelectedRows[1]);
}
}
示例6: SetGrid
void CGridCellBase::operator=( CGridCellBase& cell)
{
if (this == &cell) return;
SetGrid(cell.GetGrid()); // do first in case of dependencies
SetText(cell.GetText());
SetImage(cell.GetImage());
SetData(cell.GetData());
SetState(cell.GetState());
SetFormat(cell.GetFormat());
SetTextClr(cell.GetTextClr());
SetBackClr(cell.GetBackClr());
SetFont(cell.IsDefaultFont()? NULL : cell.GetFont());
SetMargin(cell.GetMargin());
//Used for merge cells
//by Huang Wei
SetMergeCellID(cell.GetMergeCellID());
SetMergeRange(cell.GetMergeRange());
Show(cell.IsShow());
}