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


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

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


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

示例1: Parse

int CParseString::Parse(CStringArray& array, CString separ)
{
   Init(separ);
   CString word;
   array.RemoveAll();
   while (GetNextWord(word)) array.Add(word);
   return (int)array.GetSize();
}
开发者ID:vinnie38170,项目名称:klImageCore,代码行数:8,代码来源:MyString.cpp

示例2: getFavUrl

void CFavorite::getFavUrl(CStringArray &arrayUrl)
{
    int size = arrayUrl.GetSize();
    for (int i=0; i<m_favString.GetSize(); ++i)
    {
        arrayUrl.InsertAt(size+i, m_favString.GetAt(i));
    }
}
开发者ID:harrysun2006,项目名称:ag_Client,代码行数:8,代码来源:FavoriteMenu.cpp

示例3: AddFiles

/**
 * add files.
 *
 * @param           [in] rastrFiles: string array of file names to be added
 * @param           [in] bSelected: file is selected? Default is TRUE
 * @return          successful?
*/
void CPPFileCollection::AddFiles(CStringArray& rastrFiles, BOOL bSelected /*=TRUE*/, BOOL bTemporary /*=FALSE*/)
{
    int iNumFiles = rastrFiles.GetSize();
    for(int iFile = 0; iFile < iNumFiles; ++iFile)
    {
        AddFile(rastrFiles[iFile], rastrFiles[iFile], bSelected, bTemporary);
    }
}
开发者ID:LM25TTD,项目名称:ATCMcontrol_Engineering,代码行数:15,代码来源:CPPFileCollection.cpp

示例4: EnumParameters

/////////////////////////////////////////////////////////////////////////////
// 枚举参数名
/////////////////////////////////////////////////////////////////////////////
int CPlugIn::EnumParameters(CStringArray& asName)
{
	for(int i=0; i<m_arParameter.GetSize(); i++)
	{
		asName.Add(m_arParameter[i].m_strName);
	}
	return asName.GetSize();
}
开发者ID:blueantst,项目名称:Script.NET,代码行数:11,代码来源:PlugIn.cpp

示例5: hgzExtractSubStrings

// 提取所有字符串
int hgzExtractSubStrings(				// 成功返回提取的子串数,不成功返回 0
	CStringArray& arr,				// 提取到的子串数组
	const CString& cstrFullString,	// 原字符串
	const CString& regexSep )		// 分隔符字符串
{
	int size = arr.GetSize();
	CString str(cstrFullString);
	CString subStr;
	int i = 0;
	while (hgzExtractSubString(subStr, str, i,	regexSep))
	{
		arr.Add(subStr);
		i++;
	}

	return arr.GetSize() - size;
}
开发者ID:houguozhi,项目名称:FortuneIt,代码行数:18,代码来源:hgz.cpp

示例6: BeginDownloadFiles

BOOL CFileNavDlg::BeginDownloadFiles(CStringArray& strURLs, CDWordArray& dwActionCodes)
{
	for(int j = 0; j < strURLs.GetSize(); j++)
	{
		TRACE(_T("%s\n"), strURLs[j]);
	}
	return CAcUiNavDialog::BeginDownloadFiles(strURLs, dwActionCodes);
}
开发者ID:FengLuanShuangWu,项目名称:AutoCADPlugin-HeatSource,代码行数:8,代码来源:FileNavDlg.cpp

示例7: OnCreate

int CUserListCtrl::OnCreate(LPCREATESTRUCT lpCreateStruct) 
{
	if (CP4ListCtrl::OnCreate(lpCreateStruct) == -1)
		return -1;
	
	CStringArray colnames;
	colnames.Add ( LoadStringResource(IDS_NAME) );
	colnames.Add ( LoadStringResource(IDS_E_MAIL) );
	colnames.Add ( LoadStringResource(IDS_FULL_NAME) );
	colnames.Add ( LoadStringResource(IDS_ACCESS) );
	ASSERT( USER_MAXCOL == colnames.GetSize( ) );
	int width[ USER_MAXCOL ]={90,150,150,90};
	RestoreSavedWidths( width, colnames.GetSize( ), sRegValue_UserList );
	InsertColumnHeaders( colnames, width );

	return 0;
}
开发者ID:danieljennings,项目名称:p4win,代码行数:17,代码来源:UserListCtrl.cpp

示例8: GetWindowDec

unsigned char CHgzComboBox::GetWindowDec( void )
{
	CString str;
	GetWindowText(str);

	CStringArray arr;
	hgzExtractSubStrings(arr, str, _T(" +"));
	unsigned int *pi = new unsigned int[arr.GetSize()];
	int i;
	for (i = 0; i < arr.GetSize(); i++)
	{
		_stscanf_s(arr[i], _T("%d"), pi + i);
	}
	unsigned char x = (unsigned char)pi[0];
	delete [] pi;
	return x;
}
开发者ID:houguozhi,项目名称:FortuneIt,代码行数:17,代码来源:HgzComboBox.cpp

示例9: bIsWaveformSignalPresent

// Start of helper functions
BOOL CWaveformTransmitter::bIsWaveformSignalPresent(void)
{
    ASSERT(NULL != m_pWaveDataHandler);
    CStringArray arrSignalNames;
    m_pWaveDataHandler->vGetAllDefinedSignalsNames(arrSignalNames);
    return (m_pWaveDataHandler->nGetNumberOfDefinedSignals() > 0
            && arrSignalNames.GetSize()>0 );
}
开发者ID:Schrenk,项目名称:busmaster,代码行数:9,代码来源:WaveformTransmitter.cpp

示例10: SaveStringArray

// ============================================================================
void SaveStringArray(CArchive &ar, CStringArray &strArr)
{
	int count = strArr.GetSize();
	ar << count;

	for(int i = 0; i < count; i++)
		ar << strArr[i];
}
开发者ID:artemeliy,项目名称:inf4715,代码行数:9,代码来源:visualmsdoc.cpp

示例11: DispInfoExt

static void DispInfoExt(HWND hDlg,CShellExt *lpcs)
{
	//クリア
	long items = ListBox_GetCount(GetDlgItem(hDlg,IDC_LIST_VALUE));
	if(items != LB_ERR)
	{
		for(int i=0; i<items; i++)
		{
			COggExt *oggExt = (COggExt *)ListBox_GetItemData(GetDlgItem(hDlg,IDC_LIST_VALUE),0);
			if(oggExt)
			{
				delete oggExt;
			}
			ListBox_DeleteString(GetDlgItem(hDlg,IDC_LIST_VALUE),0);
		}
	}

	CString strDisp;
	CStringArray strArray;
	lpcs->m_Ogg.GetCommentNames(strArray);
	items = 0;
	for(int i=0; i<strArray.GetSize(); i++)
	{
		CString strName = strArray.GetAt(i);
		CString strValue;
		CString _strValue;
		int j = 0;
		while(1)
		{
			if(!lpcs->m_Ogg.GetComment(strName,j++,strValue))
			{
				break;
			}

			//標準名は除外
			if((j == 1) &&
				(
				!strName.Compare(_T("TITLE")) ||
				!strName.Compare(_T("TRACKNUMBER")) ||
				!strName.Compare(_T("ARTIST")) ||
				!strName.Compare(_T("ALBUM")) ||
				!strName.Compare(_T("ALBUMARTIST")) ||
				!strName.Compare(_T("DISCNUMBER")) ||
				!strName.Compare(_T("DATE")) ||
				!strName.Compare(_T("GENRE")) ||
				!strName.Compare(_T("COMMENT")))
				)
			{
				continue;
			}
//			TRACE(_T("OGG %s %s\n"),strName,strValue);
			COggExt *oggExt = new COggExt(strName,strValue);
			ListBox_AddString(GetDlgItem(hDlg,IDC_LIST_VALUE),oggExt->Get1LineDisp());
			ListBox_SetItemData(GetDlgItem(hDlg,IDC_LIST_VALUE),items,oggExt);
			items++;
		}
	}
}
开发者ID:k-takata,项目名称:mp3infp,代码行数:58,代码来源:Page_ogg.cpp

示例12: bAddString

BOOL COutWnd::bAddString(CStringArray& omStrArray)
{
    BOOL bReturn     = TRUE;
    INT  nTotalCount = (COMMANINT)omStrArray.GetSize();
    INT  nReturnAdd  = 0;
    //   vResetContent();
    MDIActivate();
    omStrArray.Add(" ");
    INT nCount; //nCount declared outside
    for( nCount=0; nCount<nTotalCount; nCount++)
    {
        nReturnAdd = m_omListBox.AddString(omStrArray.GetAt(nCount));
        if(nReturnAdd<0)
        {
            bReturn = FALSE;
        }
    }
    // Set horizontal extent of the list box to max string availaable
    // so that user can scroll
    CSize   sz(0,0);
    CString omStrText   = "";
    CDC*  pDC = m_omListBox.GetDC();
    TEXTMETRIC   tm;
    pDC->GetTextMetrics(&tm);
    //Check for valid dc and then set the horizontal extent
    if( pDC != NULL)
    {
        //Select the new font object to calculte the extent
        //because font is set for window not for CDC
        CFont* pOldFont = pDC->SelectObject(&m_omNewFont);
        INT nTotalItem =  m_omListBox.GetCount();
        INT nDx = 0;
        for (nCount = 0; nCount < nTotalItem; nCount++)
        {
            m_omListBox.GetText( nCount, omStrText );
            // remove space
            omStrText.TrimRight();
            sz = pDC->GetTextExtent(omStrText);
            //Add avg char width for avoiding any wrapping up
            sz.cx += tm.tmAveCharWidth;
            if (sz.cx > nDx)
            {
                nDx = sz.cx;
            }
        }
        //release the new font
        pDC->SelectObject(pOldFont);
        m_omListBox.ReleaseDC(pDC);
        // Set the horizontal extent so every character of all strings
        // can be scrolled to.
        m_omListBox.SetHorizontalExtent(nDx);
    }
    else
    {
        bReturn = FALSE;
    }
    return bReturn;
}
开发者ID:brahimalaya,项目名称:busmaster,代码行数:58,代码来源:OutWnd.cpp

示例13: CollectFiles

void CollectFiles(CString InputDir,CStringArray &Files)
{
	if(!(Files.GetSize())) return;

	CDjvuDlg *parent=(CDjvuDlg *)(MAINAPP->m_pMainWnd);
	SearchRsltDlg *dlg=(SearchRsltDlg *)(&(MAINAPP->SRDlg2));
	CString T,ListFile=InputDir+"\\list.txt";
	CString name,OutFile, OutPath; 
	int i,j; j=InputDir.ReverseFind('\\'); 
	name=InputDir.Right(InputDir.GetLength()-j-1);
	OutPath=InputDir.Left(j);
	OutFile.Format("%s\\%s_$$$.djvu",OutPath,name);

	CFile list; char buf[2]; buf[0]=0x0d; buf[1]=0x0a;
	list.Open(ListFile,CFile::modeCreate | CFile::modeWrite);
	for(i=0;i<Files.GetSize();i++)
	{
		T=InputDir+"\\"+Files[i];
		list.Write(LPCSTR(T),T.GetLength()); list.Write(buf,2);
	}
	list.Close();
	
	
	T.Format("%cdjvubundle.exe%c --files=%c%s%c %c%s%c",34,34,34,ListFile,34,34,OutFile,34);
	STARTUPINFO si;  GetStartupInfo(&si); PROCESS_INFORMATION &pi1=MAINAPP->pi;	
	if(CreateProcess(NULL, (char *)LPCSTR(T), NULL, NULL, FALSE, DETACHED_PROCESS | CREATE_SUSPENDED | IDLE_PRIORITY_CLASS, NULL, NULL, &si, &pi1)) 
	{
		ResumeThread(pi1.hThread);
		WaitForSingleObject(pi1.hThread,INFINITE);

		HANDLE SearchHandle;
		WIN32_FIND_DATA FindFileData;
		if( (SearchHandle=FindFirstFile(LPCSTR(OutFile),&FindFileData) )!=INVALID_HANDLE_VALUE)
		{
			T.Format("%d files bundled SUCSESFULLY",Files.GetSize()); dlg->CollectInfo.AddString(T);
			T.Format("%s",OutFile); dlg->CollectInfo.AddString(T);
			for(i=0;i<Files.GetSize();i++)  {T=InputDir+"\\"+Files[i];DeleteFile(T);}			
			DeleteFile(ListFile);	
		}
		else
		{
			T.Format("There was an ERROR"); dlg->CollectInfo.AddString(T);		
		}		
	}	
}
开发者ID:mar80nik,项目名称:djvu,代码行数:45,代码来源:djvuDlg.cpp

示例14: Init

void PCFInstrument::Init( const CStringArray& wordArray )
{
	int wordNum = wordArray.GetSize();
	int pointNum = 0 ;
	for(int i = 0; i < wordNum; i++)
	{
       SetSEBPoint(wordArray, i, pointNum, m_PointList, m_CenterPt);
	}
}
开发者ID:uesoft,项目名称:AutoPFA,代码行数:9,代码来源:PCFInstrument.cpp

示例15: Init

void PCFPumpData::Init( const CStringArray& wordArray )
{
	int wordNum = wordArray.GetSize();
	int pointNum = 0 ;
	for(int i = 0; i < wordNum; i++)
	{
		SetSEFromBasePt(wordArray, i, pointNum, m_PointList, m_CenterPt);
	}
}
开发者ID:uesoft,项目名称:AutoPFA,代码行数:9,代码来源:PCFPumpData.cpp


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