CString CPlayerPlaylistBar::GetCurFileName() { CString fn; CPlaylistItem* pli = GetCur(); if (pli && !pli->m_fns.IsEmpty()) { fn = pli->m_fns.GetHead(); } return fn; }
BOOL CDlgPreAfn0AF7Q::OnInitDialog() { CDialog::OnInitDialog(); // TODO: Add extra initialization here m_btn_ok.SetShade(CShadeButtonST::SHS_VSHADE,8,50,5,RGB(255,255,55)); m_btn_ok.SetIcon(IDI_ICON_RIGHT); m_btn_ok.SetColor(CButtonST::BTNST_COLOR_FG_IN, RGB(255, 0, 0)); m_btn_ok.SetColor(CButtonST::BTNST_COLOR_FG_OUT, RGB(0, 0, 0)); m_btn_no.SetShade(CShadeButtonST::SHS_VSHADE,8,50,5,RGB(255,255,55)); m_btn_no.SetIcon(IDI_ICON_X); m_btn_no.SetColor(CButtonST::BTNST_COLOR_FG_IN, RGB(255, 0, 0)); m_btn_no.SetColor(CButtonST::BTNST_COLOR_FG_OUT, RGB(0, 0, 0)); GetCur(); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }
OpenMediaData* CPlayerPlaylistBar::GetCurOMD(REFERENCE_TIME rtStart) { CPlaylistItem* pli = GetCur(); if (pli == NULL) { return NULL; } pli->AutoLoadFiles(); CString fn = CString(pli->m_fns.GetHead()).MakeLower(); if (fn.Find(_T("video_ts.ifo")) >= 0 || fn.Find(_T(".ratdvd")) >= 0) { if (OpenDVDData* p = DNew OpenDVDData()) { p->path = pli->m_fns.GetHead(); p->subs.AddTailList(&pli->m_subs); return p; } } if (pli->m_type == CPlaylistItem::device) { if (OpenDeviceData* p = DNew OpenDeviceData()) { POSITION pos = pli->m_fns.GetHeadPosition(); for (int i = 0; i < _countof(p->DisplayName) && pos; i++) { p->DisplayName[i] = pli->m_fns.GetNext(pos); } p->vinput = pli->m_vinput; p->vchannel = pli->m_vchannel; p->ainput = pli->m_ainput; return p; } } else { if (OpenFileData* p = DNew OpenFileData()) { p->fns.AddTailList(&pli->m_fns); p->subs.AddTailList(&pli->m_subs); p->rtStart = rtStart; return p; } } return NULL; }