天天看点

VC++_截取字符串

CString str = _T("Duration: 00:04:12.27,");
  int start = str.Find("Duration:") + strlen("Duration:");
  int end = str.Find(",",start);
  CString time = str.Mid(start,end-start);
  MessageBox(time);      

效果如下