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


C++ CArray::GetAt方法代码示例

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


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

示例1:

CServer::~CServer(void)
{
	for (int i =0; i < g_LedInfos.GetCount(); i++)
	{
		delete g_LedInfos.GetAt(i);
	}
	g_LedInfos.RemoveAll();

	for (int i =0; i < g_DeviceInfos.GetCount(); i++)
	{
		for (int j = 0; j < g_DeviceInfos.GetAt(i)->aGroupInfos.GetCount(); j++)
		{
			delete g_DeviceInfos.GetAt(i)->aGroupInfos.GetAt(j);
		}
		delete g_DeviceInfos.GetAt(i);
	}
	g_DeviceInfos.RemoveAll();
	

	//for (int i =0; i < g_GroupInfos.GetCount(); i++)
	//{
	//	delete g_GroupInfos.GetAt(i);
	//}
	//g_GroupInfos.RemoveAll();
	//CloseSocket();
}
开发者ID:chepaiTeam,项目名称:Garage,代码行数:26,代码来源:Server.cpp

示例2: addHtmlTagToStr

void DLrtfhtml::addHtmlTagToStr(CString &str,CArray<rtfProperty,rtfProperty&> &proArr)
{
	CString temp,tag,dtag;
	int i;
	for(i=0;i<proArr.GetCount();i++)
	{//添加单标记属性
		if(proArr.GetAt(i).single==TRUE)
		{
			tag+=proArr.GetAt(i).htmlTagB;
			tag+=_T(" ");
			//tag.Format(_T(" %s %s"),tag,proArr.GetAt(i).htmlTagB);
		}
	}
	//添加双标记
	dtag=str;
	for(i=0;i<proArr.GetCount();i++)
	{
		if(proArr.GetAt(i).single!=TRUE)
		{
			dtag.Format(_T("%s%s%s"),proArr.GetAt(i).htmlTagB,dtag,proArr.GetAt(i).htmlTagE);
		}
	}
	if(!tag.IsEmpty())
	{
		temp.Format(_T("<span style=\"%s\" >"),tag);
		temp+=dtag;
		temp+=_T("</span>");
		str=temp;
	}
	else
		str=dtag;
	
}
开发者ID:DLive,项目名称:DLRtfToHtml,代码行数:33,代码来源:DLrtfhtml.cpp

示例3: FindRelevantNode

Skein::Node* TranscriptWindow::FindRelevantNode(FindAction action, bool next, bool selected)
{
    // Get all the nodes in the transcript or skein
    CArray<Skein::Node*,Skein::Node*> nodes;
    if (action == SkeinDifferent)
    {
        ASSERT(next);
        m_skein->GetAllNodes(nodes);
    }
    else
    {
        Skein::Node* node = m_skeinEndThread;
        while (node != NULL)
        {
            if (next)
                nodes.InsertAt(0,node);
            else
                nodes.Add(node);
            node = node->GetParent();
        }
    }
    if (next)
        nodes.InsertAt(0,(Skein::Node*)NULL);

    // Return the next relevant node after the selected node (which may be NULL)
    bool afterSelected = false;
    for (int i = 0; i < nodes.GetSize(); i++)
    {
        if (afterSelected == false)
        {
            if (nodes.GetAt(i) == (selected ? m_skeinSelected : NULL))
                afterSelected = true;
        }
        else
        {
            switch (action)
            {
            case TranscriptDifferent:
            case SkeinDifferent:
                if (nodes.GetAt(i)->GetDiffers() != Skein::Node::ExpectedSame)
                    return nodes.GetAt(i);
                break;
            case TranscriptChanged:
                if (nodes.GetAt(i)->GetChanged())
                    return nodes.GetAt(i);
                break;
            default:
                ASSERT(FALSE);
                break;
            }
        }
    }

    // If nothing found, then if searching the whole skein, start from the beginning
    if ((action == SkeinDifferent) && selected)
        return FindRelevantNode(action,next,false);
    return NULL;
}
开发者ID:DavidKinder,项目名称:Windows-Inform7,代码行数:58,代码来源:TranscriptWindow.cpp

示例4:

// 将OpenCV图像显示到控件上
void	CJudgeDlg::DrawPicture2HDC()
{
	m_matImage = LoadFOVImage2Color(m_pDocument->GetDirectory(), m_nFOVIndex);
	if ( !m_matImage.empty() )
	{
		CArray<CvRect, CvRect>* pRect;
		CvRect cvRect;
		CvPoint pt1, pt2;
		int i;
		//pRect = m_pDocument->GetTargetInfoInFOV(m_nWorkPosition, m_nFOVIndex);
		//for ( i = 0; i < pRect->GetSize(); i++ )
		//{				
		//	cvRect = pRect->GetAt(i);
		//	pt1.x = cvRect.x;
		//	pt1.y = cvRect.y;
		//	pt2.x = cvRect.x + cvRect.width;
		//	pt2.y = cvRect.y + cvRect.height;
		//	cvRectangle(m_pcvImage, pt1, pt2, CV_RGB(255,0,0), 2, 8,0);
		//}
				
		pRect = m_pDocument->GetSimpleTargetInfoInFOV(m_nFOVIndex);
		for ( i = 0; i < pRect->GetSize(); i++ )
		{				
			cvRect = pRect->GetAt(i);
			pt1.x = cvRect.x;
			pt1.y = cvRect.y;
			pt2.x = cvRect.x + cvRect.width;
			pt2.y = cvRect.y + cvRect.height;
			cv::rectangle(m_matImage, pt1, pt2, CV_RGB(255,0,0), 2, 8,0);
		}
		pRect = m_pDocument->GetOverlapTargetInfoInFOV( m_nFOVIndex);
		for ( i = 0; i < pRect->GetSize(); i++ )
		{				
			cvRect = pRect->GetAt(i);
			pt1.x = cvRect.x;
			pt1.y = cvRect.y;
			pt2.x = cvRect.x + cvRect.width;
			pt2.y = cvRect.y + cvRect.height;
			cv::rectangle(m_matImage, pt1, pt2, CV_RGB(0,255,0), 2, 8,0);
		}

		UINT ID = IDC_FOV_IMAGE;
		
		CDC *pDC = this->GetDlgItem(ID)->GetDC();
		HDC hDC = pDC->GetSafeHdc();

		CRect	rect;
		this->GetDlgItem(ID)->GetClientRect(&rect);
		
		CMyBitmap bmp;
		bmp.CopyFromMat(m_matImage);
		bmp.Draw(hDC,rect,1,0,0);

		ReleaseDC(pDC);	
	}	
}
开发者ID:donkey3456,项目名称:BacilusDetect,代码行数:57,代码来源:JudgeDlg.cpp

示例5: EjectDLLToControlProcess

///
///	@brief	구조체 배열에 저장되어 있는 자식 IE에 인젝트된 DLL을 이젝트
///
void EjectDLLToControlProcess()
{
	CString strDLL;
	HANDLE	hProcess;

	for(int i = 0; i < g_ArrInjectProcess.GetCount(); i++)
	{
		strDLL = g_ArrInjectProcess.GetAt(i).strDLL;
		hProcess = g_ArrInjectProcess.GetAt(i).hProcess;

		UninjectLibrary(strDLL, hProcess);
	}
}
开发者ID:devyyj,项目名称:Mini-DLP,代码行数:16,代码来源:Hooking.cpp

示例6: Init

void CDlgSpeedTest::Init()
{
	m_cList.DeleteAllItems();
	CArray<CommInfo*,CommInfo*> *pSite = g_pDoLogin->m_commData.GetSysServerInfo();
	CArray<CommInfo*,CommInfo*> *pSiteUsr = g_pDoLogin->m_commData.GetUsrServerInfo();
	int sel = m_cTabCtl.GetCurSel();
	switch (sel)
	{
	case 0:
		m_cType = CEV_Connect_HQ;
		break;
	case 1:
		m_cType = CEV_Connect_JY;
		break;
	}
	m_nNotiCount = 0;
	m_nTotalCount = 0;
 	if (pSite)
 	{
 		for (int i=0; i<pSite->GetCount(); i++)
 		{
 			CommInfo *pInfo = pSite->GetAt(i);
 			if (pInfo->m_cType == m_cType)
 			{
 				int n = m_cList.GetItemCount();
				m_nTotalCount++;
				m_cList.InsertItem(n,pInfo->m_strServerID);
				m_cList.SetItemText(n,1,"...");
				m_cList.SetItemText(n,2,"...");
				m_cList.SetItemText(n,3,"...");
 			}
 		}
 	}
	if (pSiteUsr)
	{
		for (int i=0; i<pSiteUsr->GetCount(); i++)
		{
			CommInfo *pInfo = pSiteUsr->GetAt(i);
			if (pInfo->m_cType == m_cType)
			{
				int n = m_cList.GetItemCount();
				m_nTotalCount++;
				m_cList.InsertItem(n,pInfo->m_strServerID);
				m_cList.SetItemText(n,1,"...");
				m_cList.SetItemText(n,2,"...");
				m_cList.SetItemText(n,3,"...");
			}
		}
	}
}
开发者ID:hefen1,项目名称:XCaimi,代码行数:50,代码来源:DlgSpeedTest.cpp

示例7: DoTestFiles

void DoTestFiles(const char *filelist, const char *environment)
{
	if (!GetTestFiles(filelist)) {
		printf("No Files to test!\r\n");
		return;
	}

	Results.SetSize(IsapiFileList.GetSize());

	ReadGlobalEnvironment(environment);

	DoThreads();

	printf("\r\nRESULTS:\r\n");
	// show results:
	DWORD r = Results.GetSize();
	for (DWORD i=0; i< r; i++) {
		TResults result = Results.GetAt(i);
		printf("%s\r\nOK: %d FAILED: %d\r\n", TestNames.GetAt(i), result.ok, result.bad);
	}

	// delete temp files
	printf("Deleting Temp Files\r\n");
	DeleteTempFiles("exp.*");
	DeleteTempFiles("pht.*");
	printf("Done\r\n");
}
开发者ID:kennyb,项目名称:php-broken,代码行数:27,代码来源:stresstest.cpp

示例8: SetCurrentPageInfo

void CCalloutConfigDialog::SetCurrentPageInfo(int iDisplayTime) {
    int iActivePage = m_pEditorDoc->project.GetActivePage(iDisplayTime);
    if(iActivePage != m_iActivePage) {
        m_iActivePage = iActivePage;
    } else {
        return;
    }
    UINT nStartMs, nEndMs;
    CString csSeconds;
    csSeconds.LoadString(IDC_CALLOUT_TIME_SEC);
    m_pEditorDoc->project.GetPagePeriod(iDisplayTime, nStartMs, nEndMs);
    CString csLblText;
    csLblText.Format(_T("%.3f %s"), nStartMs / 1000.0, csSeconds);
    m_lblPageStart.SetWindowText(csLblText);
    csLblText.Format(_T("%.3f %s"), nEndMs / 1000.0, csSeconds);
    m_lblPageEnd.SetWindowText(csLblText);
    csLblText.Format(_T("%.3f %s"), (nEndMs - nStartMs) / 1000.0, csSeconds);
    m_lblPageLength.SetWindowText(csLblText);

    CArray<CPage*, CPage*> caPages;
    m_pEditorDoc->project.GetPages(caPages, iDisplayTime , iDisplayTime + 1);
    if(caPages.GetCount() > 0) {
        CString csTitle = caPages.GetAt(0)->GetTitle();
        m_lblPageName.SetWindowText(csTitle);
    }
}
开发者ID:identity0815,项目名称:os45,代码行数:26,代码来源:CalloutConfigDialog.cpp

示例9: Reset

void CTobCompiler::Reset()
{
	m_line = 0;
	m_err.Empty();
	m_bin.RemoveAll();
	if(m_fsrc) { fclose(m_fsrc); m_fsrc = 0; }
	if(m_fdst) { fclose(m_fdst); m_fdst = 0; }

	POSITION p = m_defbin.GetStartPosition();
	CString str;
	CByteArray* bin;
	while(p)
	{
		m_defbin.GetNextAssoc(p, str, bin);
		delete bin;
	}
	m_defbin.RemoveAll();
	m_defbin.InitHashTable(251);

	m_label.RemoveAll();
	m_label.InitHashTable(251);
	for(int i = m_exp.GetSize() - 1; i >= 0; --i)
		delete m_exp.GetAt(i);
	m_exp.RemoveAll();
	m_change.RemoveAll();
	m_change.InitHashTable(251);
	m_bit_i = 32;
	m_bit_f = 32;
	m_maxc = -1;
	m_maxw = -1;
	m_maxs = -1;
}
开发者ID:QuocHuy7a10,项目名称:Arianrhod,代码行数:32,代码来源:tobc_023.cpp

示例10: DeleteKey

void CRegistry::DeleteKey(HKEY hParent, LPCTSTR pszKey)
{
	HKEY hKey;
	if ( RegOpenKeyEx( hParent, pszKey, 0, KEY_ALL_ACCESS, &hKey ) ) return;

	CArray< CString > pList;

	for ( DWORD nIndex = 0 ; ; nIndex++ )
	{
		DWORD dwName = 64;	// Input parameter in TCHARs
		TCHAR szName[64];

		LRESULT lResult = RegEnumKeyEx( hKey, nIndex, szName, &dwName, NULL, NULL, 0, NULL );
		if ( lResult != ERROR_SUCCESS ) break;

		szName[ dwName ] = 0;
		pList.Add( szName );
		DeleteKey( hKey, szName );
	}

	for ( int nItem = pList.GetSize() - 1 ; nItem >= 0 ; nItem-- )
	{
		RegDeleteKey( hKey, pList.GetAt( nItem ) );
	}

	if ( lstrlen( pszKey ) > 25 )	// Handle likely initial non-recursive value
		RegDeleteKey( HKEY_CURRENT_USER, pszKey );

	RegCloseKey( hKey );
}
开发者ID:lemonxiao0,项目名称:peerproject,代码行数:30,代码来源:Registry.cpp

示例11: GetNext

// Takes a connected computer to ignore, and a GUID (do)
// Randomly chooses a neighbour from amongst those that are connected, running Gnutella2, hubs, and don't know about the GUID
// Returns a pointer to that randomly selected neighbour
CG2Neighbour* CNeighboursWithG2::GetRandomHub(CG2Neighbour* pExcept, const Hashes::Guid& oGUID)
{
	// Make a new local empty list that will hold pointers to neighbours
	CArray< CG2Neighbour* > pRandom;

	// Loop through each computer we're connected to
	for ( POSITION pos = GetIterator() ; pos ; )
	{
		// Get the neighbour under the current position, and move to the next one in the list
		CNeighbour* pNeighbour = GetNext( pos );

		// If this is a Gnutella2 hub
		if ( pNeighbour->m_nState == nrsConnected   &&	// We've finished the handshake with this computer, and
			 pNeighbour->m_nProtocol == PROTOCOL_G2 &&	// It's running Gnutella2 software, and
			 pNeighbour->m_nNodeType != ntLeaf      &&	// Our connection to it isn't down to a leaf, and
			 pNeighbour != pExcept )					// It's not the one the caller told us to avoid
		{
			// And it doesn't know the given GUID, add it to the random list
			if ( static_cast< CG2Neighbour* >( pNeighbour )->m_pGUIDCache->Lookup( oGUID ) == NULL )
				pRandom.Add( static_cast< CG2Neighbour* >( pNeighbour ) );
		}
	}

	// If we didn't find any neighbours to put in the list, return null
	INT_PTR nSize = pRandom.GetSize();
	if ( ! nSize ) return NULL;

	// Choose a random number between 0 and nSize - 1, use it as an index, and return the neighbour at it
	nSize = GetRandomNum< INT_PTR >( 0, nSize - 1 );
	return pRandom.GetAt( nSize );
}
开发者ID:lemonxiao0,项目名称:peerproject,代码行数:34,代码来源:NeighboursWithG2.cpp

示例12: zhfzhftool_dttk

	// ----- zhfzhftool._dttk command (do not rename)
	static void zhfzhftool_dttk(void)
	{
		// Add your code for command zhfzhftool._dttk here
		if (g_bIsTukuFirst)
		{
			InitApplication() ;
		}
		else
		{
			CMDIFrameWnd* pAcadFrame  = acedGetAcadFrame();

			if (g_pArrayZhfPaletteSet.GetCount()>1)
			{
				CZhfPaletteSet* pSet = g_pArrayZhfPaletteSet.GetAt(1) ;
				if (pSet->IsWindowVisible())
				{
					pAcadFrame->ShowControlBar(pSet, FALSE, FALSE);
				}
				else
				{
					pAcadFrame->ShowControlBar(pSet, TRUE, FALSE);
				}	
			}
			else
			{
				acutPrintf(_T("\n图库面板没有创建或创建失败,无法显示!")) ;
			}
		}
	}
开发者ID:luosin,项目名称:Temp,代码行数:30,代码来源:acrxEntryPoint.cpp

示例13: BindAllUserToListBox

void CUserDlg::BindAllUserToListBox()
{
	UpdateData(TRUE);

	m_lsbUserList.ResetContent();

	MailUser* mailU=new MailUser();
	CString userStr;
	CArray<MailUser,MailUser&>* mailUsers =mailU->GetAllUsers();

	int numberUser=mailUsers->GetCount();

	if ((mailUsers != NULL) &&numberUser!=NULL)
		{

			//CString result;
			//result=mailUsers->GetAt(1)._username;
		for (int i=0;i<numberUser;i++)
		{
		
			userStr.Format("%s",mailUsers->GetAt(i)._username);
			m_lsbUserList.AddString(userStr);
		}
	}
	UpdateData(FALSE);
}
开发者ID:dieforrockvn,项目名称:laptrinhmang-k52,代码行数:26,代码来源:UserDlg.cpp

示例14: str

// -----------------------------------------------------------//
// Function:    CModifyMemoryDlg::GetProcessInfo
// Param                
// Return  :    void    
// meaning :    �l������M�� 
// -----------------------------------------------------------//
void    CModifyMemoryDlg::GetProcessInfo()
{
    m_ProcessList.DeleteAllItems();

    // �l������M��
    CArray<PROCESSENTRY32_, PROCESSENTRY32_> processList;
    FlushProcessInfo(processList);
    int nSize = processList.GetCount();
    for(int i = 0; i < nSize; i++)
    {
        PROCESSENTRY32_ entry = processList.GetAt(i);
        m_ProcessList.InsertItem(i, "");
        // SetValue
        CString str(entry.szExeFile);
        m_ProcessList.SetItemText(i, 0, str);
        str.Format("%d", entry.th32ProcessID);
        m_ProcessList.SetItemText(i, 1, str);
        str.Format("%d", entry.th32ParentProcessID);
        m_ProcessList.SetItemText(i, 2, str);
        str.Format("%d", entry.th32ModuleID);
        m_ProcessList.SetItemText(i, 3, str);
        str.Format("%d", entry.cntThreads);
        m_ProcessList.SetItemText(i, 4, str);
    }
}
开发者ID:layerfsd,项目名称:Work,代码行数:31,代码来源:ModifyMemoryDlg.cpp

示例15: OnBnClickedConnectCheck

//===========================================================================
void CFAVConnectDlg::OnBnClickedConnectCheck()
//===========================================================================
{
	// TODO: Add your control notification handler code here
	CArray<CString,CString> strArrayCOM;
	UINT	uPortCount;
	CComboBox* pCbox = (CComboBox*)GetDlgItem(IDC_CONNECT_COMSEL);
	CString strCOMPORT;
	if(m_bCOMSel){
		GetDlgItem(IDC_CONNECT_COMSEL)->EnableWindow(FALSE);
		m_bGetSerialPort = FALSE;
		for(UINT i = pCbox->GetCount(); i > 0; i--){
			pCbox->DeleteString(i-1);
		}
		m_bCOMSel = FALSE;
	}
	else{
		if(!m_bGetSerialPort){
			m_bGetSerialPort = TRUE;
			uPortCount = m_UARTComm.GetSerialPort(TRUE, strArrayCOM);
			for(UINT i = 0; i < uPortCount; i++){
				strCOMPORT = strArrayCOM.GetAt(m_UARTComm.GetCOMIndex(i));
				pCbox->InsertString(i,strCOMPORT);
			}
			pCbox->SetCurSel(0);
		}
		GetDlgItem(IDC_CONNECT_COMSEL)->EnableWindow(TRUE);
		m_bCOMSel = TRUE;
	}
}
开发者ID:hydrayu,项目名称:imobile-src,代码行数:31,代码来源:FAVConnectDlg.cpp


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