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


C++ CAtlArray::Add方法代码示例

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


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

示例1: GetAudioFilter

void CMediaFormats::GetAudioFilter(CString& filter, CAtlArray<CString>& mask)
{
	CString		strTemp;
	filter += _T("Audio files (all types)|");
	mask.Add(_T(""));

	for(size_t i = 0; i < GetCount(); i++)
	{
		CMediaFormatCategory& mfc = GetAt(i);
		if(mfc.IsAudioOnly() != 1 || mfc.GetEngineType() != DirectShow) continue;
		strTemp  = GetAt(i).GetFilter() + _T(";");
		mask[0] += strTemp;
		filter  += strTemp;
	}

	mask[0].TrimRight(_T(";"));
	filter.TrimRight(_T(";"));
	filter += _T("|");

	for(size_t i = 0; i < GetCount(); i++)
	{
		CMediaFormatCategory& mfc = GetAt(i);
		if(mfc.IsAudioOnly() != 1 || mfc.GetEngineType() != DirectShow) continue;
		filter += mfc.GetLabel() + _T("|") + GetAt(i).GetFilter() + _T("|");
		mask.Add(mfc.GetFilter());
	}

	filter += _T("All files (*.*)|(*.*)|");
	mask.Add(_T("*.*"));

	filter += _T("|");
}
开发者ID:XyzalZhang,项目名称:SPlayer,代码行数:32,代码来源:MediaFormats.cpp

示例2: GetAudioFilter

void CMediaFormats::GetAudioFilter(CString& filter, CAtlArray<CString>& mask)
{
	CString		strTemp;
	filter += ResStr(IDS_AG_AUDIOFILES);
	mask.Add(_T(""));

	for (size_t i = 0; i < GetCount(); i++) {
		CMediaFormatCategory& mfc = GetAt(i);
		if (mfc.GetFileType() == TAudio/* && mfc.GetEngineType() == DirectShow*/) {
			strTemp	= GetAt(i).GetFilter() + _T(";");
			mask[0]	+= strTemp;
			filter	+= strTemp;
		}
	}

	mask[0].TrimRight(_T(';'));
	filter.TrimRight(_T(';'));
	filter += _T("|");

	for (size_t i = 0; i < GetCount(); i++) {
		CMediaFormatCategory& mfc = GetAt(i);
		if (mfc.GetFileType() == TAudio/* && mfc.GetEngineType() == DirectShow*/) {
			filter += mfc.GetDescription() + _T("|") + GetAt(i).GetFilter() + _T("|");
			mask.Add(mfc.GetFilter());
		}
	}

	filter += ResStr(IDS_AG_ALLFILES);
	mask.Add(_T("*.*"));

	filter += _T("|");
}
开发者ID:WinnerSoftLab,项目名称:WinnerMediaPlayer,代码行数:32,代码来源:MediaFormats.cpp

示例3: GetFilter

void CMediaFormats::GetFilter(CString& filter, CAtlArray<CString>& mask)
{
	CString		strTemp;

	filter += ResStr(IDS_MEDIAFORMATS_34);
	mask.Add(_T(""));

	for(int i = 0; i < GetCount(); i++)
	{
		strTemp  = GetAt(i).GetFilter() + _T(";");
		mask[0] += strTemp;
		filter  += strTemp;
	}
	mask[0].TrimRight(_T(";"));
	filter.TrimRight(_T(";"));
	filter += _T("|");

	for(int i = 0; i < GetCount(); i++)
	{
		CMediaFormatCategory& mfc = GetAt(i);
		filter += mfc.GetLabel() + _T("|" + GetAt(i).GetFilter() + _T("|"));
		mask.Add(mfc.GetFilter());
	}

	filter += ResStr(IDS_MEDIAFORMATS_35);
	mask.Add(_T("*.*"));

	filter += _T("|");
}
开发者ID:Fluffiest,项目名称:mpc-hc,代码行数:29,代码来源:MediaFormats.cpp

示例4: GetFilter

void CMediaFormats::GetFilter(CString& filter, CAtlArray<CString>& mask)
{
	CString		strTemp;

	filter += _T("Media files (all types)|");
	mask.Add(_T(""));

	for(size_t i = 0; i < GetCount(); i++) 
	{
		strTemp  = GetAt(i).GetFilter() + _T(";");;
		mask[0] += strTemp;
		filter  += strTemp;
	}
	mask[0].TrimRight(_T(";"));
	filter.TrimRight(_T(";"));
	filter += _T("|");

	for(size_t i = 0; i < GetCount(); i++)
	{
		CMediaFormatCategory& mfc = GetAt(i);
		filter += mfc.GetLabel() + _T("|" + GetAt(i).GetFilter() + _T("|"));
		mask.Add(mfc.GetFilter());
	}

	filter.Append( ResStr(IDS_FILEOPEN_DISLOG_ALL_MEDIA_TYPE) );
	mask.Add(_T("*.*"));

	filter += _T("|");
}
开发者ID:XyzalZhang,项目名称:SPlayer,代码行数:29,代码来源:MediaFormats.cpp

示例5: GetAudioFilter

void CMediaFormats::GetAudioFilter(CString& filter, CAtlArray<CString>& mask)
{
	CString		strTemp;
	filter += ResStr(IDS_MEDIAFORMATS_36);
	mask.Add(_T(""));

	for(int i = 0; i < GetCount(); i++)
	{
		CMediaFormatCategory& mfc = GetAt(i);
		if(!mfc.IsAudioOnly() || mfc.GetEngineType() != DirectShow) continue;
		strTemp  = GetAt(i).GetFilter() + _T(";");
		mask[0] += strTemp;
		filter  += strTemp;
	}

	mask[0].TrimRight(_T(";"));
	filter.TrimRight(_T(";"));
	filter += _T("|");

	for(int i = 0; i < GetCount(); i++)
	{
		CMediaFormatCategory& mfc = GetAt(i);
		if(!mfc.IsAudioOnly() || mfc.GetEngineType() != DirectShow) continue;
		filter += mfc.GetLabel() + _T("|") + GetAt(i).GetFilter() + _T("|");
		mask.Add(mfc.GetFilter());
	}

	filter += ResStr(IDS_MEDIAFORMATS_35);
	mask.Add(_T("*.*"));

	filter += _T("|");
}
开发者ID:Fluffiest,项目名称:mpc-hc,代码行数:32,代码来源:MediaFormats.cpp

示例6: GetFilter

void CMediaFormats::GetFilter(CString& filter, CAtlArray<CString>& mask) const
{
    CString strTemp;

    filter += ResStr(IDS_AG_MEDIAFILES);
    mask.Add(_T(""));

    for (size_t i = 0; i < GetCount(); i++) {
        strTemp = GetAt(i).GetFilter() + _T(";");
        mask[0] += strTemp;
        filter  += strTemp;
    }
    mask[0].TrimRight(_T(';'));
    filter.TrimRight(_T(';'));
    filter += _T("|");

    for (size_t i = 0; i < GetCount(); i++) {
        const CMediaFormatCategory& mfc = GetAt(i);
        filter += mfc.GetDescription() + _T("|" + GetAt(i).GetFilter() + _T("|"));
        mask.Add(mfc.GetFilter());
    }

    filter += ResStr(IDS_AG_ALLFILES);
    mask.Add(_T("*.*"));

    filter += _T("|");
}
开发者ID:AeonAxan,项目名称:mpc-hc,代码行数:27,代码来源:MediaFormats.cpp

示例7: OnViewBBCode

LRESULT CHistoryWindow::OnViewBBCode(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
{
	TreeItem* item = m_treeView.selectedItem();
	if(!item) return 0;
	CAtlArray<CUrlListItem> items;

	if(item->level()==0)
	{
		CHistorySession* ses = reinterpret_cast<CHistorySession*>(item->userData());
		for(int i=0; i<ses->entriesCount(); i++)
		{
			CUrlListItem it  =fromHistoryItem(ses->entry(i));
			items.Add(it);
		}
	}
	else
	{
		HistoryItem* hit = reinterpret_cast<HistoryItem*>(item->userData());
		CUrlListItem it  = fromHistoryItem(*hit);
		items.Add(it);
	}
	CResultsWindow rp( pWizardDlg, items,false);
	rp.DoModal(m_hWnd);
	return 0;
}
开发者ID:wchingwei,项目名称:image-uploader,代码行数:25,代码来源:HistoryWindow.cpp

示例8: GetAudioFilter

void CMediaFormats::GetAudioFilter(CString& filter, CAtlArray<CString>& mask) const
{
    CString strTemp;

    filter += ResStr(IDS_AG_AUDIOFILES);
    mask.Add(_T(""));

    for (size_t i = 0; i < GetCount(); i++) {
        const CMediaFormatCategory& mfc = GetAt(i);
        if (!mfc.IsAudioOnly() || mfc.GetEngineType() != DirectShow) {
            continue;
        }
        strTemp  = GetAt(i).GetFilter() + _T(";");
        mask[0] += strTemp;
        filter  += strTemp;
    }

    mask[0].TrimRight(_T(';'));
    filter.TrimRight(_T(';'));
    filter += _T("|");

    for (size_t i = 0; i < GetCount(); i++) {
        const CMediaFormatCategory& mfc = GetAt(i);
        if (!mfc.IsAudioOnly() || mfc.GetEngineType() != DirectShow) {
            continue;
        }
        filter += mfc.GetDescription() + _T("|") + GetAt(i).GetFilter() + _T("|");
        mask.Add(mfc.GetFilter());
    }

    filter += ResStr(IDS_AG_ALLFILES);
    mask.Add(_T("*.*"));

    filter += _T("|");
}
开发者ID:AeonAxan,项目名称:mpc-hc,代码行数:35,代码来源:MediaFormats.cpp

示例9: GetFilter

void CMediaFormats::GetFilter(CString& filter, CAtlArray<CString>& mask)
{
	CString strTemp;

	// Add All Media formats
	filter += ResStr(IDS_AG_MEDIAFILES);
	mask.Add(_T(""));

	for (size_t i = 0; i < GetCount(); i++) {
		strTemp	= GetAt(i).GetFilter() + _T(";");
		mask[0]	+= strTemp;
		filter	+= strTemp;
	}
	// add graphics formats
	mask[0]	+= GRAPHIC_FMT;
	filter	+= GRAPHIC_FMT;
	filter	+= _T("|");

	// Add Video formats
	filter += ResStr(IDS_AG_VIDEOFILES);
	mask.Add(_T(""));

	for (size_t i = 0; i < GetCount(); i++) {
		if (GetAt(i).GetFileType() == TVideo) {
			strTemp = GetAt(i).GetFilter() + _T(";");
			mask[1] += strTemp;
			filter += strTemp;
		}
	}
	filter.TrimRight(_T(';'));
	filter += _T("|");

	// Add Audio formats
	filter += ResStr(IDS_AG_AUDIOFILES);
	mask.Add(_T(""));

	for (size_t i = 0; i < GetCount(); i++) {
		if (GetAt(i).GetFileType() == TAudio) {
			strTemp	= GetAt(i).GetFilter() + _T(";");
			mask[1]	+= strTemp;
			filter	+= strTemp;
		}
	}
	filter.TrimRight(_T(';'));
	filter += _T("|");

	for (size_t i = 0; i < GetCount(); i++) {
		CMediaFormatCategory& mfc	= GetAt(i);
		filter						+= mfc.GetDescription() + _T("|" + GetAt(i).GetFilter() + _T("|"));
		mask.Add(mfc.GetFilter());
	}

	filter += ResStr(IDS_AG_ALLFILES);
	mask.Add(_T("*.*"));

	filter += _T("|");
}
开发者ID:WinnerSoftLab,项目名称:WinnerMediaPlayer,代码行数:57,代码来源:MediaFormats.cpp

示例10: Read

bool CDSMSplitterFile::Read(__int64 len, CAtlArray<SyncPoint>& sps)
{
	SyncPoint sp = {0, 0};
	sps.RemoveAll();

	while (len > 0) {
		bool fSign = !!BitRead(1);
		int iTimeStamp = (int)BitRead(3);
		int iFilePos = (int)BitRead(3);
		BitRead(1); // reserved

		sp.rt += (REFERENCE_TIME)BitRead(iTimeStamp<<3) * (fSign ? -1 : 1);
		sp.fp += BitRead(iFilePos<<3);
		sps.Add(sp);

		len -= 1 + iTimeStamp + iFilePos;
	}

	if (len != 0) {
		sps.RemoveAll();
		return false;
	}

	// TODO: sort sps

	return true;
}
开发者ID:Samangan,项目名称:mpc-hc,代码行数:27,代码来源:DSMSplitterFile.cpp

示例11: Expand

bool TrackEntry::Expand(CBinary& data, UINT64 Scope)
{
    if (ces.ce.IsEmpty()) {
        return true;
    }

    CAtlArray<ContentEncoding*> cearray;
    POSITION pos = ces.ce.GetHeadPosition();
    while (pos) {
        cearray.Add(ces.ce.GetNext(pos));
    }
    qsort(cearray.GetData(), cearray.GetCount(), sizeof(ContentEncoding*), cesort);

    for (int i = (int)cearray.GetCount() - 1; i >= 0; i--) {
        ContentEncoding* ce = cearray[i];

        if (!(ce->ContentEncodingScope & Scope)) {
            continue;
        }

        if (ce->ContentEncodingType == ContentEncoding::Compression) {
            if (!data.Decompress(ce->cc)) {
                return false;
            }
        } else if (ce->ContentEncodingType == ContentEncoding::Encryption) {
            // TODO
            return false;
        }
    }

    return true;
}
开发者ID:GottfriedCP,项目名称:mpc-hc,代码行数:32,代码来源:MatroskaFile.cpp

示例12: LoadInternalExceptionList

static void LoadInternalExceptionList()
{
	g_aException.SetCount( 0, 32 );

	LPCTSTR rs = NULL;
	size_t len = AtlLoadString(
		IDS_INTERNAL_EXCEPTIONS,
		reinterpret_cast<LPTSTR>(&rs),
		0
		);

	LPTSTR buf = reinterpret_cast<LPTSTR>( malloc((len + 1) * sizeof(TCHAR)) );
	_tcsncpy( buf, rs, len );
	buf[len] = 0;

	LPCTSTR p = _tcstok( buf, _T("|") );
	while( p != NULL )
	{
		CExceptionInfo ei;
		ei.bUser = false;
		ei.bFiltered = false;
		ei.dwCode = _tcstoul( p, NULL, 0 );
		p = _tcstok( NULL, _T("|") );
		_tcsncpy( ei.szName, p, _countof(ei.szName) );
		ei.szName[_countof(ei.szName) - 1] = 0;
		g_aException.Add( ei );
		p = _tcstok( NULL, _T("|") );
	}

	free( buf );
}
开发者ID:localvar,项目名称:backup,代码行数:31,代码来源:Main.cpp

示例13: strTmp

int CBkSafeMsgBox2::ParseMsgLine(CString strMsg, CAtlArray<CString>& arrMsg)
{
	int nRet = -1;
	if (TRUE == strMsg.IsEmpty())
		return nRet;
	arrMsg.RemoveAll();

	strMsg.Replace(_T("\\n"), _T("\n"));

	int nIndex = -1;
	strMsg += L"\n";
	CString strTmp(L""), msg = strMsg;;
	nIndex = msg.Find(L"\n");

	while (-1 != nIndex)
	{
		strTmp = msg.Left(nIndex);
		if (strTmp.GetLength())
			arrMsg.Add(strTmp);
		msg = msg.Mid(nIndex+1);

		nIndex = msg.Find(L"\n");
	} 

	return arrMsg.GetCount();
}
开发者ID:dreamsxin,项目名称:PcManager,代码行数:26,代码来源:beikesafemsgbox.cpp

示例14: CreateOutputs

HRESULT CMpaSplitterFilter::CreateOutputs(IAsyncReader* pAsyncReader)
{
	CheckPointer(pAsyncReader, E_POINTER);

	HRESULT hr = E_FAIL;

	m_pFile.Free();

	m_pFile.Attach(new CMpaSplitterFile(pAsyncReader, hr));
	if(!m_pFile) return E_OUTOFMEMORY;
	if(FAILED(hr)) {m_pFile.Free(); return hr;}

	CAtlArray<CMediaType> mts;
	mts.Add(m_pFile->GetMediaType());

	CAutoPtr<CBaseSplitterOutputPin> pPinOut(new CBaseSplitterOutputPin(mts, L"Audio", this, this, &hr));
	AddOutputPin(0, pPinOut);

	m_rtNewStart = m_rtCurrent = 0;
	m_rtNewStop = m_rtStop = m_rtDuration = m_pFile->GetDuration();

	CStringW str, title;
	if(m_pFile->m_tags.Lookup('TIT2', str)) title = str;
	if(m_pFile->m_tags.Lookup('TYER', str) && !title.IsEmpty() && !str.IsEmpty()) title += L" (" + str + L")";
	if(!title.IsEmpty()) SetProperty(L"TITL", title);
	if(m_pFile->m_tags.Lookup('TPE1', str)) SetProperty(L"AUTH", str);
	if(m_pFile->m_tags.Lookup('TCOP', str)) SetProperty(L"CPYR", str);
	if(m_pFile->m_tags.Lookup('COMM', str)) SetProperty(L"DESC", str);

	return m_pOutputs.GetCount() > 0 ? S_OK : E_FAIL;
}
开发者ID:Fluffiest,项目名称:splayer,代码行数:31,代码来源:MpaSplitter.cpp

示例15: CreateOutputs

HRESULT CMpaSplitterFilter::CreateOutputs(IAsyncReader* pAsyncReader)
{
	CheckPointer(pAsyncReader, E_POINTER);

	HRESULT hr = E_FAIL;

	m_pFile.Free();

	m_pFile.Attach(DNew CMpaSplitterFile(pAsyncReader, hr));
	if (!m_pFile) {
		return E_OUTOFMEMORY;
	}
	if (FAILED(hr)) {
		m_pFile.Free();
		return hr;
	}

	CAtlArray<CMediaType> mts;
	mts.Add(m_pFile->GetMediaType());

	CAutoPtr<CBaseSplitterOutputPin> pPinOut(DNew CBaseSplitterOutputPin(mts, L"Audio", this, this, &hr));
	AddOutputPin(0, pPinOut);

	m_rtNewStart = m_rtCurrent = 0;
	m_rtNewStop = m_rtStop = m_rtDuration = m_pFile->GetDuration();

	SetID3TagProperties(this, m_pFile->ID3Tag);

	return m_pOutputs.GetCount() > 0 ? S_OK : E_FAIL;
}
开发者ID:avdbg,项目名称:MPC-BE,代码行数:30,代码来源:MpaSplitter.cpp


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