This commit is contained in:
Daveo 2001-02-07 18:46:59 +00:00
parent 9dd82e90c5
commit c1059872a2
8 changed files with 85 additions and 144 deletions

View file

@ -288,3 +288,35 @@ GString Path;
return(Path);
}
/*****************************************************************************/
void CheckFilename(GString &Filename)
{
FILE *File;
CString mexstr;
GFName FName=Filename;
GString Name;
// Check File exists
File=fopen(Filename,"r");
if (File)
{
fclose(File);
return;
}
Name=FName.File();
Name.Append('.');
Name+=FName.Ext();
mexstr.Format("%s Not Found.\n\nPlease Locate\n", Filename);
AfxMessageBox(mexstr,MB_OK | MB_ICONEXCLAMATION);
char BASED_CODE Filter[]= "All Files (*.*)|*.*||";
CFileDialog Dlg(true,NULL,Name,OFN_HIDEREADONLY | OFN_PATHMUSTEXIST,Filter);
if (Dlg.DoModal()!=IDOK) return;
Filename=Dlg.GetPathName();
}