POSITION pos ( fileDlg.GetStartPosition() );while( pos ) { CString csFileName( fileDlg.GetNextPathName( pos ) ); //implement ur fn to open the file accordingly }
CStringArray cstrArr; if (fd.DoModal()==IDOK) {// invalid file name will be prompted. // file existence will be checked // may be multi selection under one same directory POSITION pos=fd.GetStartPosition( ); while (pos) { cstrArr.Add(fd.GetNextPathName(pos)); }
mcisendstring播放我想让它同步 就是一首放完放下一首的那种~
参考:LRESULT CTestDlg::OnMciNotify(WPARAM wParam,LPARAM IParam) { int iSel=-1; switch (wParam) { case MCI_NOTIFY_ABORTED: //The device received a command that prevented the current conditions //for initiating the callback function from being met. //If a new command interrupts the current command and it also requests notification, //the device sends this message only and not MCI_NOTIFY_SUPERSEDED. // AfxMessageBox("ABORTED"); break; case MCI_NOTIFY_FAILURE: //A device error occurred while the device was executing the command. // AfxMessageBox("FAILED"); break; case MCI_NOTIFY_SUCCESSFUL: //The conditions initiating the callback function have been met. //AfxMessageBox("SUCCESSFUL"); if(m_bLineDown==TRUE) break;// ? skip // iSel=m_iSelAll[m_FileCounter]; if(m_ListCtrl.GetCheck(iSel)==TRUE) { m_wave.Replay(); } else { OnStop(); m_FileCounter++; if(m_FileCounter < (int) m_ListCtrl.GetSelectedCount()) { OnPlay(); } else { m_FileCounter=0; } } break; case MCI_NOTIFY_SUPERSEDED: //The device received another command with the "notify" flag set and //the current conditions for initiating the callback function have been superseded. // AfxMessageBox("SUPERSEDED"); break; } return 0; }
{
CString csFileName( fileDlg.GetNextPathName( pos ) );
//implement ur fn to open the file accordingly
}
每个文件名都会用‘\0’来分割开来,例如:
C:\TEXT\\0A.TXT\0B.TXT\0\0
if (fd.DoModal()==IDOK)
{// invalid file name will be prompted.
// file existence will be checked
// may be multi selection under one same directory
POSITION pos=fd.GetStartPosition( );
while (pos)
{
cstrArr.Add(fd.GetNextPathName(pos));
}
mcisendstring播放我想让它同步 就是一首放完放下一首的那种~
{
int iSel=-1;
switch (wParam)
{
case MCI_NOTIFY_ABORTED:
//The device received a command that prevented the current conditions
//for initiating the callback function from being met.
//If a new command interrupts the current command and it also requests notification,
//the device sends this message only and not MCI_NOTIFY_SUPERSEDED.
// AfxMessageBox("ABORTED");
break;
case MCI_NOTIFY_FAILURE:
//A device error occurred while the device was executing the command.
// AfxMessageBox("FAILED");
break;
case MCI_NOTIFY_SUCCESSFUL:
//The conditions initiating the callback function have been met.
//AfxMessageBox("SUCCESSFUL");
if(m_bLineDown==TRUE) break;// ? skip
//
iSel=m_iSelAll[m_FileCounter];
if(m_ListCtrl.GetCheck(iSel)==TRUE)
{
m_wave.Replay();
}
else
{
OnStop();
m_FileCounter++;
if(m_FileCounter < (int) m_ListCtrl.GetSelectedCount())
{
OnPlay();
}
else
{
m_FileCounter=0;
}
}
break;
case MCI_NOTIFY_SUPERSEDED:
//The device received another command with the "notify" flag set and
//the current conditions for initiating the callback function have been superseded.
// AfxMessageBox("SUPERSEDED");
break;
}
return 0;
}