本文整理匯總了C++中CAtlList::GetNext方法的典型用法代碼示例。如果您正苦於以下問題:C++ CAtlList::GetNext方法的具體用法?C++ CAtlList::GetNext怎麽用?C++ CAtlList::GetNext使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CAtlList
的用法示例。
在下文中一共展示了CAtlList::GetNext方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: AddItem
void CPlayerPlaylistBar::AddItem(CAtlList<CString>& fns, CAtlList<CString>* subs)
{
CPlaylistItem pli;
POSITION pos = fns.GetHeadPosition();
while (pos) {
CString fn = fns.GetNext(pos);
if (!fn.Trim().IsEmpty()) {
pli.m_fns.AddTail(fn);
}
}
if (subs) {
POSITION posSub = subs->GetHeadPosition();
while (posSub) {
CString fn = subs->GetNext(posSub);
if (!fn.Trim().IsEmpty()) {
pli.m_subs.AddTail(fn);
}
}
}
pli.AutoLoadFiles();
m_pl.AddTail(pli);
}
示例2: Lookup
bool SubtitleFile::Lookup(float at, CAutoPtrList<Subtitle>& subs)
{
if(!subs.IsEmpty()) {ASSERT(0); return false;}
CAtlList<SegmentItem> sis;
m_segments.Lookup(at, sis);
POSITION pos = sis.GetHeadPosition();
while(pos)
{
SegmentItem& si = sis.GetNext(pos);
CAutoPtr<Subtitle> s(DNew Subtitle(this));
if(s->Parse(si.pDef, si.start, si.stop, at))
{
for(POSITION pos = subs.GetHeadPosition(); pos; subs.GetNext(pos))
{
if(s->m_layer < subs.GetAt(pos)->m_layer)
{
subs.InsertBefore(pos, s);
break;
}
}
if(s)
{
subs.AddTail(s);
}
}
}
return !subs.IsEmpty();
}
示例3: SetNoRecentDocs
void CFileAssoc::SetNoRecentDocs(bool bNoRecentDocs, bool bUpdateAssocs /*= false*/)
{
if (bNoRecentDocs == m_bNoRecentDocs) {
bUpdateAssocs = false;
} else {
m_bNoRecentDocs = bNoRecentDocs;
}
CAtlList<CString> exts;
if (bUpdateAssocs && GetAssociatedExtensionsFromRegistry(exts)) {
CRegKey key;
POSITION pos = exts.GetHeadPosition();
while (pos) {
const CString& ext = exts.GetNext(pos);
if (ERROR_SUCCESS == key.Open(HKEY_CLASSES_ROOT, PROGID + ext)) {
if (m_bNoRecentDocs) {
key.SetStringValue(_T("NoRecentDocs"), _T(""));
} else {
key.DeleteValue(_T("NoRecentDocs"));
}
}
}
}
}
示例4: OnInitDialog
BOOL CShaderCombineDlg::OnInitDialog()
{
__super::OnInitDialog();
AddAnchor(IDC_LIST1, TOP_LEFT, BOTTOM_RIGHT);
AddAnchor(IDC_COMBO1, BOTTOM_LEFT, BOTTOM_RIGHT);
AddAnchor(IDC_STATIC1, BOTTOM_LEFT, BOTTOM_RIGHT);
AddAnchor(IDC_BUTTON2, BOTTOM_RIGHT);
AddAnchor(IDC_BUTTON3, BOTTOM_RIGHT);
AddAnchor(IDC_BUTTON1, TOP_RIGHT);
AddAnchor(IDC_BUTTON4, TOP_RIGHT);
AddAnchor(IDOK, TOP_RIGHT);
AddAnchor(IDCANCEL, TOP_RIGHT);
AppSettings& s = AfxGetCurrentSettings();
CString str = s.m_shadercombine.Trim();
CAtlList<CString> sl;
if(!str.IsEmpty()) Explode(str, sl, '|');
POSITION pos = sl.GetHeadPosition();
while(pos) m_list.AddString(sl.GetNext(pos));
pos = s.m_shaders.GetHeadPosition();
while(pos) m_combo.AddString(s.m_shaders.GetNext(pos).label);
if(m_combo.GetCount()) m_combo.SetCurSel(0);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
示例5: OnDropFiles
void CPPageExternalFilters::OnDropFiles(CAtlList<CString>& slFiles, DROPEFFECT)
{
SetActiveWindow();
POSITION pos = slFiles.GetHeadPosition();
while (pos) {
CString fn = slFiles.GetNext(pos);
CFilterMapper2 fm2(false);
fm2.Register(fn);
while (!fm2.m_filters.IsEmpty()) {
if (FilterOverride* f = fm2.m_filters.RemoveHead()) {
CAutoPtr<FilterOverride> p(f);
int i = m_filters.InsertItem(m_filters.GetItemCount(), f->name);
m_filters.SetItemData(i, reinterpret_cast<DWORD_PTR>(m_pFilters.AddTail(p)));
m_filters.SetCheck(i, 1);
if (fm2.m_filters.IsEmpty()) {
m_filters.SetItemState(i, LVIS_SELECTED, LVIS_SELECTED);
m_filters.SetSelectionMark(i);
OnFilterSelectionChange();
}
m_filters.SetColumnWidth(0, LVSCW_AUTOSIZE);
SetModified();
}
}
}
}
示例6: OnDropFiles
void CPPageExternalFilters::OnDropFiles(CAtlList<CString>& slFiles, DROPEFFECT)
{
SetActiveWindow();
POSITION pos = slFiles.GetHeadPosition();
while (pos) {
CString fn = slFiles.GetNext(pos);
CFilterMapper2 fm2(false);
fm2.Register(fn);
while (!fm2.m_filters.IsEmpty()) {
if (FilterOverride* f = fm2.m_filters.RemoveHead()) {
CAutoPtr<FilterOverride> p(f);
int i = m_filters.AddString(f->name);
m_filters.SetItemDataPtr(i, m_pFilters.AddTail(p));
m_filters.SetCheck(i, 1);
if (fm2.m_filters.IsEmpty()) {
m_filters.SetCurSel(i);
OnFilterSelectionChange();
}
SetModified();
}
}
}
}
示例7: ReplaceCodecsPath
HRESULT CDSFilters::ReplaceCodecsPath(CAtlList<DSFilterInfo*>& InfoList, CString& strNewPath)
{
DSFilterInfo* pInfo = NULL;
POSITION pos = InfoList.GetHeadPosition();
while (pos)
{
pInfo = InfoList.GetNext(pos);
if (pInfo != NULL)
{
pInfo->path.Replace(m_strCodecsPath, strNewPath);
POSITION pos2 = pInfo->depends.GetHeadPosition();
while (pos2)
{
CString& depend = pInfo->depends.GetNext(pos2);
depend.Replace(m_strCodecsPath, strNewPath);
}
pos2 = pInfo->preloads.GetHeadPosition();
while (pos2)
{
CString& preload = pInfo->preloads.GetNext(pos2);
preload.Replace(m_strCodecsPath, strNewPath);
}
}
}
return S_OK;
}
示例8: Parse
void SubtitleFile::Parse(InputStream& s)
{
m_segments.RemoveAll();
__super::Parse(s, s_predef);
// TODO: check file.format == "ssf" and file.version == 1
CAtlList<Definition*> defs;
GetRootRef()->GetChildDefs(defs, L"subtitle");
StringMapW<float> offset;
POSITION pos = defs.GetHeadPosition();
while(pos)
{
Definition* pDef = defs.GetNext(pos);
try
{
Definition::Time time;
if(pDef->GetAsTime(time, offset) && (*pDef)[L"@"].IsValue())
{
m_segments.Insert(time.start.value, time.stop.value, pDef);
}
}
catch(Exception&)
{
}
}
}
示例9: SortInfoByExtension
void CDSFilters::SortInfoByExtension(CAtlList<DSFilterInfo*>& InfoList, const TCHAR* pcszExtension)
{
DSFilterInfo* pInfo = NULL;
POSITION pos = InfoList.GetHeadPosition();
while (pos)
{
BOOL bMatched = FALSE;
pInfo = InfoList.GetAt(pos);
if (pInfo != NULL)
{
POSITION pos2 = pInfo->extensions.GetHeadPosition();
while (pos2)
{
CString& extension = pInfo->extensions.GetNext(pos2);
if (extension.CompareNoCase(pcszExtension+1))
{
bMatched = TRUE;
break;
}
}
if (bMatched)
{
InfoList.MoveToHead(pos);
}
}
InfoList.GetNext(pos);
}
}
示例10: OpenFiles
BOOL CMultiFiles::OpenFiles(CAtlList<CHdmvClipInfo::PlaylistItem>& files, UINT nOpenFlags)
{
POSITION pos = files.GetHeadPosition();
LARGE_INTEGER llSize;
int nPos = 0;
REFERENCE_TIME rtDur = 0;
Reset();
while(pos)
{
CHdmvClipInfo::PlaylistItem& s = files.GetNext(pos);
m_strFiles.Add(s.m_strFileName);
if (!OpenPart(nPos)) return false;
llSize.QuadPart = 0;
GetFileSizeEx (m_hFile, &llSize);
m_llTotalLength += llSize.QuadPart;
m_FilesSize.Add (llSize.QuadPart);
m_rtPtsOffsets.Add (rtDur);
rtDur += s.Duration();
nPos++;
}
if (files.GetCount() > 1) ClosePart();
return TRUE;
}
示例11: AreRegisteredFileContextMenuEntries
CFileAssoc::reg_state_t CFileAssoc::AreRegisteredFileContextMenuEntries(const CMediaFormatCategory& mfc)
{
CAtlList<CString> exts;
ExplodeMin(mfc.GetExtsWithPeriod(), exts, ' ');
size_t cnt = 0;
POSITION pos = exts.GetHeadPosition();
while (pos) {
if (CFileAssoc::AreRegisteredFileContextMenuEntries(exts.GetNext(pos))) {
cnt++;
}
}
reg_state_t res;
if (cnt == 0) {
res = NOT_REGISTERED;
} else if (cnt == exts.GetCount()) {
res = ALL_REGISTERED;
} else {
res = SOME_REGISTERED;
}
return res;
}
示例12: ParsePlayList
void CPlayerPlaylistBar::ParsePlayList(CAtlList<CString>& fns, CAtlList<CString>* subs)
{
if (fns.IsEmpty()) {
return;
}
const CAppSettings& s = AfxGetAppSettings();
ResolveLinkFiles(fns);
CAtlList<CString> sl;
if (SearchFiles(fns.GetHead(), sl)) {
if (sl.GetCount() > 1) {
subs = NULL;
}
POSITION pos = sl.GetHeadPosition();
while (pos) {
ParsePlayList(sl.GetNext(pos), subs);
}
return;
}
CAtlList<CString> redir;
CStringA ct = GetContentType(fns.GetHead(), &redir);
if (!redir.IsEmpty()) {
POSITION pos = redir.GetHeadPosition();
while (pos) {
ParsePlayList(sl.GetNext(pos), subs);
}
return;
}
if (ct == "application/x-mpc-playlist") {
ParseMPCPlayList(fns.GetHead());
return;
} else {
#if INTERNAL_SOURCEFILTER_MPEG
if (ct == "application/x-bdmv-playlist" && s.SrcFilters[SRC_MPEG]) {
ParseBDMVPlayList(fns.GetHead());
return;
}
#endif
}
AddItem(fns, subs);
}
示例13: FindFileInList
bool FindFileInList(const CAtlList<CString>& sl, CString fn)
{
bool fFound = false;
POSITION pos = sl.GetHeadPosition();
while (pos && !fFound) {
if (!sl.GetNext(pos).CompareNoCase(fn)) {
fFound = true;
}
}
return fFound;
}
示例14: Append
void CPlayerPlaylistBar::Append(CAtlList<CString>& fns, bool fMulti, CAtlList<CString>* subs)
{
if (fMulti) {
ASSERT(subs == NULL || subs->GetCount() == 0);
POSITION pos = fns.GetHeadPosition();
while (pos) {
ParsePlayList(fns.GetNext(pos), NULL);
}
} else {
ParsePlayList(fns, subs);
}
Refresh();
SavePlaylist();
}
示例15: Register
bool CFileAssoc::Register(CMediaFormatCategory& mfc, bool bRegister, bool bRegisterContextMenuEntries, bool bAssociatedWithIcon)
{
CAtlList<CString> exts;
ExplodeMin(mfc.GetExtsWithPeriod(), exts, ' ');
CString strLabel = mfc.GetDescription();
bool res = true;
POSITION pos = exts.GetHeadPosition();
while (pos) {
res &= Register(exts.GetNext(pos), strLabel, bRegister, bRegisterContextMenuEntries, bAssociatedWithIcon);
}
return res;
}