当前位置: 首页>>代码示例>>C++>>正文


C++ CStringArray::GetCount方法代码示例

本文整理汇总了C++中CStringArray::GetCount方法的典型用法代码示例。如果您正苦于以下问题:C++ CStringArray::GetCount方法的具体用法?C++ CStringArray::GetCount怎么用?C++ CStringArray::GetCount使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CStringArray的用法示例。


在下文中一共展示了CStringArray::GetCount方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: CreateCheckOutList

BOOL CIBAOutputBar::CreateCheckOutList()
{
	const DWORD dwViewStyle = LVS_REPORT | LVS_NOSORTHEADER | WS_CHILD | WS_VISIBLE | WS_HSCROLL | WS_VSCROLL;

	if (!m_listCheckOut.Create(dwViewStyle, CRect(1, 1, 1, 1), &m_wndTabs, 6))
	{
		TRACE0("Failed to create Consumeoutput view\n");
		return FALSE;      // fail to create
	}

	CIBAString strHeader;
	strHeader.LoadString(IDS_REFUND_RECORD_HEAD); // _T("结账时间|用户级别|终端号|上机时间|上网账号|姓名|证件号码|金额|备注");

	CStringArray strArray;
	CIBAHelpper::SplitLine(strHeader, strArray);

	const UINT Width[] = {90, 80, 80, 140, 140, 80,140,100,170};

	int nColCount = sizeof(Width)/sizeof(UINT);
	if( nColCount != strArray.GetCount() )
	{
		strHeader = _T("结账时间|用户级别|终端号|上机时间|上网账号|姓名|证件号码|金额|备注");
		strArray.RemoveAll();
		CIBAHelpper::SplitLine(strHeader, strArray);
		nColCount = strArray.GetCount();
	}

	for (INT i = 0; i < nColCount; i++)
	{
		m_listCheckOut.InsertColumn(i, strArray.GetAt(i), LVCFMT_LEFT, Width[i]);
	}

	return TRUE;
}
开发者ID:layerfsd,项目名称:PersonalIBA,代码行数:34,代码来源:OutputBar.cpp

示例2: CreateActiveList

BOOL CIBAOutputBar::CreateActiveList()
{
	const DWORD dwViewStyle = LVS_REPORT | LVS_NOSORTHEADER | WS_CHILD | WS_VISIBLE | WS_HSCROLL | WS_VSCROLL;

	if (!m_wndListActive.Create(dwViewStyle, CRect(1, 1, 1, 1), &m_wndTabs, 3))
	{
		TRACE0("Failed to create Activeoutput view\n");
		return FALSE;      // fail to create
	}

	CIBAString strHeader;
	strHeader.LoadString(IDS_LOGACTIVELISTGHEADER);

	CStringArray strArray;
	CIBAHelpper::SplitLine(strHeader, strArray);

	const UINT Width[] = {70, 90, 150, 80, 100, 80, 150};

	int nColCount = sizeof(Width)/sizeof(UINT);
	if( nColCount != strArray.GetCount() )
	{
		IBA_ASSERT2(false,"字符串分割的数组长度不相等,请检查字符串表中的字符串是否有改动");

		nColCount = nColCount < strArray.GetCount() ?
			nColCount : strArray.GetCount();  // 防止发生意外
	}

	for (INT i = 0; i < nColCount; i++)
	{
		m_wndListActive.InsertColumn(i, strArray.GetAt(i), LVCFMT_LEFT, Width[i]);
	}

	return TRUE;
}
开发者ID:layerfsd,项目名称:PersonalIBA,代码行数:34,代码来源:OutputBar.cpp

示例3: CreateConsumeList

BOOL CIBAOutputBar::CreateConsumeList()
{
	const DWORD dwViewStyle = LVS_REPORT | LVS_NOSORTHEADER | WS_CHILD | WS_VISIBLE | WS_HSCROLL | WS_VSCROLL;

	if (!m_wndConsumeInfo.Create(dwViewStyle, CRect(1, 1, 1, 1), &m_wndTabs, 5))
	{
		TRACE0("Failed to create Consumeoutput view\n");
		return FALSE;      // fail to create
	}

	CIBAString strHeader;
	//strHeader.LoadString(IDS_RETURNLOG);
	strHeader.LoadString(IDS_CONSUME_LIST_HEAD);//L"消费类型|金额|详细信息|其他|上网账号|姓名";

	CStringArray strArray;
	CIBAHelpper::SplitLine(strHeader, strArray);

	const UINT Width[] = {80, 80, 300, 80, 130, 100};

	int nColCount = sizeof(Width)/sizeof(UINT);
	if( nColCount != strArray.GetCount() )
	{
		IBA_ASSERT2(false,"字符串分割的数组长度不相等,请检查字符串表中的字符串是否有改动");

		nColCount = nColCount < strArray.GetCount() ?
			nColCount : strArray.GetCount();  // 防止发生意外
	}

	for (INT i = 0; i < nColCount; i++)
	{
		m_wndConsumeInfo.InsertColumn(i, strArray.GetAt(i), LVCFMT_LEFT, Width[i]);
	}

	return TRUE;
}
开发者ID:layerfsd,项目名称:PersonalIBA,代码行数:35,代码来源:OutputBar.cpp

示例4: OnOpenTestSuite

void CUIControler::OnOpenTestSuite()
{
	CString m_strSelectedFolder;
	if (!theApp.GetShellManager()->BrowseForFolder(m_strSelectedFolder, AfxGetMainWnd(), m_strSelectedFolder))
		return;
	

	std::string folderPath=CCommonUtilities::toBasicString(m_strSelectedFolder);
	//
	for (foldersVectorT::iterator myIt=foldersVector.begin();
		myIt!=foldersVector.end();myIt++)
	{
		std::string thisFolderPath=*myIt;
		if (thisFolderPath==folderPath)
		{
			AfxMessageBox(_T("Already opened, choose update instead"));
			return;
		}
	}


	CStringArray files;

	CFileFind finder;
	BOOL bWorking = finder.FindFile(m_strSelectedFolder+_T("/*.xml"));
	while (bWorking)
	{
		bWorking = finder.FindNextFile();
		files.Add(finder.GetFilePath());
	} 

	if (files.GetCount()!=0)
	{
		HTREEITEM hSuiteItem=pHistoryTree->createSuiteTreeItem(m_strSelectedFolder);
		foldersVector.push_back(folderPath);
		addFolderToHomeCombo(m_strSelectedFolder);
		//
		for (int i=0;i<files.GetCount();i++)
		{
			std::string filePath=CCommonUtilities::toBasicString(files[i]);

			testsFilesMapT::iterator myIt=testsFilesMap.find(filePath);
			if(myIt==testsFilesMap.end())
			{
				CTestsFile* pTests=openFile(filePath);
				if (pTests)
				{
					pTests->setParentFolder(folderPath);
					pHistoryTree->renderFile(pTests,hSuiteItem);
				}
			}	
		}
	}
	else
	{
		AfxMessageBox(_T("Folder is empty"));
	}	
}
开发者ID:geforce42376,项目名称:easyprofiler,代码行数:58,代码来源:uicontroller.cpp

示例5: ReadData

bool CCSVFile::ReadData(CStringArray &arr)
{
	// Verify correct mode in debug build
	ASSERT(m_nMode == modeRead);

	// Read next line
	CString sLine;
	int nValue = 0;
    int nColumn = 0; //统计数据列
	bool bCheakCol = true;
	while (ReadString(sLine))
	{
		if( !(sLine[0]>='0' && sLine.GetAt(0)<='9') ) //不读每行的首个字符不为数字的数据
			continue;
		LPCTSTR p = sLine;
		while (*p != '\0')
		{
			CString s;  // String to hold this value

			// Parse unquoted value
			while (*p != '\0' && *p != ',')
			{
				s.AppendChar(*p++);
			}
			
			// Advance to next character (if not already end of string)
				if (*p != '\0')
					p++;
				if (bCheakCol)
				{
					nColumn++; // 计算数据列数
				}

			// Add this string to value array
				if (nValue < arr.GetCount())
					arr[nValue] = s;
				else
					arr.Add(s);
				nValue++;
				
		}
		bCheakCol =false;
			
	}
	// Trim off any unused array values
	if (arr.GetCount() > nValue)
		arr.RemoveAt(nValue, arr.GetCount() - nValue);
	// We return true if ReadString() succeeded--even if no values
	return true;
	

	// Parse values in this line  需要给数据分列在此
	
}
开发者ID:Wanghuaichen,项目名称:SignalProcess,代码行数:54,代码来源:CSVFile.cpp

示例6: InitList

BOOL CDlgAllCheckOut::InitList(void)
{
	CRect rectGrid;
	GetDlgItem(IDC_STATIC_CHECKOUT)->GetClientRect(&rectGrid);
	GetDlgItem(IDC_STATIC_CHECKOUT)->MapWindowPoints(this, &rectGrid);
	m_GridCtrl.Create(WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_BORDER, rectGrid, this, (UINT)-1);
	
	m_GridCtrl.RemoveAll();
	
	while(m_GridCtrl.GetColumnCount() > 0)
	{
		m_GridCtrl.DeleteColumn(0);
	}

	CString strHeader;
	//strHeader.LoadString(IDS_DUTYJXC);
	strHeader = L"上网账号|姓名|用户级别|电脑名称|可退金额(元)|退款状态";

	CStringArray strArray;
	CIBAHelpper::SplitLine(strHeader, strArray);

	const UINT Width[] = {125, 80, 90, 70, 90, 80, 80};

	for (INT i = 0; i < strArray.GetCount(); i++)
	{
		m_GridCtrl.InsertColumn(i, strArray.GetAt(i), Width[i]);
		m_GridCtrl.SetColumnAlign(i, HDF_LEFT);
	}

	m_GridCtrl.InsertColumn(i, _T(""), 80);

	m_GridCtrl.SetWholeRowSel();
	m_GridCtrl.SetSingleSel(FALSE);
	m_GridCtrl.EnableHeader(TRUE, BCGP_GRID_HEADER_SORT);

	// Set grid colors
	CBCGPGridColors colors;
	colors.m_LeftOffsetColors.m_clrBackground = globalData.clrWindow;
	colors.m_OddColors.m_clrBackground = RGB(238, 246, 255);

	m_GridCtrl.SetColorTheme(colors);//颜色调配器

	//m_GridCtrl.SetFont(&m_Font);

	for(INT i=0; i < strArray.GetCount(); i++)
	{
		m_listCtrl.InsertColumn(i, strArray.GetAt(i),LVCFMT_LEFT,Width[i]);
	}
	m_listCtrl.InsertColumn(strArray.GetCount(), _T(""),LVCFMT_LEFT,80,TRUE,FALSE,TRUE,NULL,NS_COMMON::CGxxListCtrl::GLC_Button);

	return TRUE;
}
开发者ID:layerfsd,项目名称:PersonalIBA,代码行数:52,代码来源:AllCheckOut.cpp

示例7: InitList

// 初始化列表控件
void CCardopenConsumeView::InitList(void)
{
	UpdateData(FALSE);
	m_InfoList.DeleteAllItems();

	//取得列表头的子项数目
	INT nCount = m_InfoList.GetHeaderCtrl().GetItemCount();
	//清空数据
	for (INT i = 0; i < nCount; i++)
	{
		m_InfoList.DeleteColumn(0);
	}

	CIBAString strHeader;
	strHeader.LoadString(IDS_CARDOPENCONSUMEHEAD);

	//strHeader = L"上网账号|姓名|证件号码|开户时间|备注";

	if (m_InfoList.GetHeaderCtrl().GetItemCount() <= 0)
	{
		CStringArray strArray;
		CIBAHelpper::SplitLine(strHeader, strArray);

		const UINT Width[] = {180, 180, 180, 180,180};

		for (INT i = 0; i < strArray.GetCount(); i++)
		{
			m_InfoList.InsertColumn(i, strArray.GetAt(i), LVCFMT_LEFT, Width[i]);
		}
	}

	m_InfoList.SetFont(&m_Font);//子项字体

	m_InfoList.SetExtendedStyle(LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES);//子项样式
}
开发者ID:layerfsd,项目名称:PersonalIBA,代码行数:36,代码来源:CardopenConsumeDlg.cpp

示例8: GetFirstTakeNumData

BOOL CInlineQueData::GetFirstTakeNumData(SLZData& data,const CStringArray& arrStrQueId)
{
	BOOL flag = FALSE;
	BOOL canDo = FALSE;
	POSITION pos = m_lstInlineQue.GetHeadPosition();
	SLZData tempdata;
	while(pos)
	{
		tempdata = m_lstInlineQue.GetNext(pos);
		for(int i=0;i<arrStrQueId.GetCount();i++)
		{
			if(arrStrQueId[i].Compare(tempdata.GetBussinessType()) == 0)
			{
				canDo = TRUE;
				break;
			}
		}
		if(canDo)
		{
			if(!flag)
			{
				data = tempdata;
				flag = TRUE;
			}
			else
			{
				data = data.GetTakingNumTime() < tempdata.GetTakingNumTime() ? data : tempdata;
			}
		}
	}
	return flag;
}
开发者ID:Forlearngit,项目名称:HallQueFront,代码行数:32,代码来源:InlineQueData.cpp

示例9: GetCandoQueHaveData

void CInlineQueData::GetCandoQueHaveData(CStringArray& queIDArray,const CStringArray& canDoQueIDArray,UINT uWndID)
{
	int count = canDoQueIDArray.GetCount();
	for(int i = 0; i < count; i++)
	{
		CString candoQueID = canDoQueIDArray[i];
		POSITION pos = m_lstInlineQue.GetHeadPosition();
		while(pos)
		{
			SLZData data;
			POSITION posLast = pos;
			data = m_lstInlineQue.GetNext(pos);
			if(data.GetWindowId()==0)//如果没设置指定窗口
			{
				if(candoQueID.Compare(data.GetBussinessType()) == 0)
				{
					queIDArray.Add(candoQueID);
					break;
				}
			}
			else//设置了指定窗口
			{
				if(uWndID == data.GetWindowId())
				{
					queIDArray.Add(data.GetBussinessType());
					break;
				}
			}
		}
	}
}
开发者ID:Forlearngit,项目名称:HallQueFront,代码行数:31,代码来源:InlineQueData.cpp

示例10: SetCheckItems

void CLayerTreeDlg::SetCheckItems(HTREEITEM hItem, CStringArray& arrayLayers)
{
	if (NULL != hItem)
	{
		for (int  i=0; i<arrayLayers.GetCount(); i++)
		{
			if (arrayLayers.GetAt(i).CompareNoCase(m_tree.GetItemText(hItem)) == 0)
			{
				m_tree.SetCheck(hItem);
			}
		}

		HTREEITEM hChildItem = m_tree.GetChildItem(hItem);

		if (hChildItem != NULL)
		{
			// 递归搜索所有子项
			while (hChildItem != NULL)
			{
				SetCheckItems(hChildItem, arrayLayers);
				hChildItem = m_tree.GetNextItem(hChildItem, TVGN_NEXT);
			}
		}
	}
}
开发者ID:fredrikjonsson,项目名称:cadof72bian,代码行数:25,代码来源:LayerTreeDlg.cpp

示例11: LoadWndParameter

BOOL CSetupWnd::LoadWndParameter(CString& strParameter)
{
	CStringArray arData;

	if (!m_edPath)
		return FALSE;

	CString sToken = _T("");
	int i = 0;
	while (AfxExtractSubString(sToken, strParameter, i, ','))
	{
		arData.Add(sToken);
		i++;
	}

	if (arData.GetCount() != $VALUE_MAX)
		return FALSE;
		
	m_btnEnable->SetCheck(_tstoi(arData.GetAt($VALUE_ENABLE)));

	CString strTemp(arData.GetAt($VALUE_PATH));
	strTemp.Replace(L"\\", L"\\\\");
	m_edPath->SetWindowText(strTemp);


	return TRUE;
}
开发者ID:xstarty,项目名称:SPYM,代码行数:27,代码来源:SetupWnd.cpp

示例12: InitGridTree

void CNDCheckInDlg::InitGridTree()
{
	CRect rectGrid;
	GetDlgItem(IDC_GIRD_RECT)->GetClientRect(&rectGrid);
	GetDlgItem(IDC_GIRD_RECT)->MapWindowPoints(this, &rectGrid);
	GetDlgItem(IDC_GIRD_RECT)->ShowWindow(SW_HIDE);

	m_wndGridTree.Create(WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_BORDER, rectGrid, this, (UINT)-1);
	m_wndGridTree.EnableHeader(TRUE, BCGP_GRID_HEADER_SORT);

	CIBAString strHeader;
	strHeader.LoadString(IDS_CHECKIN_HEAD);

	//strHeader = L"电脑名称|状态|区域";

	CStringArray strArray;
	CIBAHelpper::SplitLine(strHeader, strArray);

	const UINT Width[] = {100, 100, 115};

	for (INT i = 0; i < strArray.GetCount(); i++)
	{
		m_wndGridTree.InsertColumn(i, strArray.GetAt(i), Width[i]);
		m_wndGridTree.SetColumnAlign(i, HDF_LEFT);
	}
}
开发者ID:layerfsd,项目名称:PersonalIBA,代码行数:26,代码来源:NDCheckInDlg.cpp

示例13: ShowCallerWaitNum

BOOL CCallThread::ShowCallerWaitNum(const CString& queID,int nWaitNum)
{
	if(queID.IsEmpty())return FALSE;
	std::map<UINT,SLZWindow>::const_iterator itera = m_rInlineQueData.m_rWindowTable.m_mapIdWindow.begin();
	for(itera;itera!=m_rInlineQueData.m_rWindowTable.m_mapIdWindow.end();itera++)
	{
		SLZWindow Window = itera->second;
		CStringArray ArrayQueID;
		Window.GetArrayQueId(ArrayQueID);
		for(int i=0;i<ArrayQueID.GetCount();i++)
		{
			CString wStrQueID = ArrayQueID.GetAt(i);
			if(wStrQueID == queID)
			{
				SLZData data;
				m_rCalledQueData.GetCalledQueData(Window.GetWindowId(),data);
				CString wStrWaitNum;
				wStrWaitNum.Format(_T("%d"),nWaitNum);
				CString carriedData = data.GetQueueNumber() + _T(" ") + wStrWaitNum;
				CallerCmd callerCmd;
				callerCmd.SetCmdType(callerCmdShowNum);
				callerCmd.SetWindowId(Window.GetWindowId());
				callerCmd.SetCarriedData(carriedData);
				ReturnToCaller(callerCmd);
				break;
			}
		}
	}
	return TRUE;
}
开发者ID:myhlj,项目名称:HallQueFront,代码行数:30,代码来源:CallThread.cpp

示例14: OpenSecondBlockMenu

int CDrawQuoteTabCtrl::OpenSecondBlockMenu(CString strMarketName, CPoint point)
{
	CStringArray ayBlock;
	if (m_iBlockManager->GetBlockName(strMarketName, ayBlock) > 0)
	{
		CDrawQuoteTab* pTab = m_ayItem[m_nCurItem];
		CString strCurItemName = pTab->m_strName;

		CMenu menu;
		menu.CreatePopupMenu();

		int nCount(0);
		for (int i = 0; i < ayBlock.GetCount(); i++)
		{
			menu.AppendMenu(0, CDRAWTAB_ID_MENU_BLOCK_BEGIN + nCount, ayBlock.GetAt(i));
			m_mapTempMenuIndex.SetAt(CDRAWTAB_ID_MENU_BLOCK_BEGIN+nCount, ayBlock.GetAt(i));
			if (!strCurItemName.IsEmpty() && strCurItemName == ayBlock.GetAt(i))
			{
				menu.CheckMenuItem(CDRAWTAB_ID_MENU_BLOCK_BEGIN+nCount,MF_BYCOMMAND|MF_CHECKED);
			}
			nCount++;
		}
		
		//////////////////////////////////////////////////////////////////////////
		CWnd* pWnd = m_pDrawTabNotify->TabGetCWnd();
		int nMenuID = menu.TrackPopupMenu(TPM_VERPOSANIMATION | TPM_LEFTALIGN | TPM_RIGHTBUTTON | TPM_RETURNCMD, point.x, point.y,pWnd);
		menu.DestroyMenu();
		return nMenuID;
	}
	return -1;
}
开发者ID:hefen1,项目名称:XCaimi,代码行数:31,代码来源:DrawQuoteTabCtrl.cpp

示例15:

int
ODBCStringsMatrix::CutToSmallStrings(char* szString, CStringArray& arrSmallStrings)
	{
	int nLoop	= 0;
	int	nStart	= 0;
	arrSmallStrings.RemoveAll();

	while( szString[nLoop] != '\0' )
		{
		if( szString[nLoop] == ' ' )
			{
			char	cOld	= szString[nLoop];
			szString[nLoop]	= '\0';
			CString sValue	= (LPCTSTR)&szString[nStart];
			szString[nLoop]	= cOld;

			if( sValue.GetLength() )
				arrSmallStrings.Add(sValue);
			nStart			= nLoop + 1;
			}

		nLoop ++;
		}

	CString sValue	= (LPCTSTR)&szString[nStart];
	sValue.Remove(' ');
	if( sValue.GetLength() )
		arrSmallStrings.Add(sValue);

	return (long)arrSmallStrings.GetCount();
	}
开发者ID:zqrtalent,项目名称:MercuryUI,代码行数:31,代码来源:ODBCStringsMatrix.cpp


注:本文中的CStringArray::GetCount方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。