程序的功能是打开某文件(如:*.abc),如果先运行程序再打开文件,没问题。如果没有打开应用程序而是通过“选择文件--右键--打开方式”来打开时,就会提示“找不到文件”打开失败。代码是如下的,请大家给诊断下
void::fun(CString sPathName)
{
   .........
CFileStatus status ;
CString strFileName = sPathName;
if (!CFile::GetStatus(strFileName,status))
{
AfxMessageBox("找不到文件!");
AfxMessageBox("03 Doclnit");
AfxMessageBox(strFileName); return FALSE ;
}
  ........
}