if (dlg.DoModal() == IDOK)
{
POSITION pos = dlg.GetStartPosition();
while (pos != NULL)
{
CString strPath = dlg.GetNextPathName(pos);
if (strPath.Find(":\\\\") == 1 && strPath.GetLength() > 4)
{
// this means we have an invalid path that looks like this:
// C:\\foo.bmp
// We need to cut out the extra slash
CString temp;
temp = strPath.Left(3);
temp += strPath.Mid(4);
strPath = temp;
}
AddFiles(strPath, TRUE);
}
}
}