Posted on 2013-03-29 17:26
盛勝 閱讀(261)
評論(0) 編輯 收藏 引用
if (PathFileExists(path))
{
CString tempStr;
tempStr.Format("shell32.dll,OpenAs_RunDLL %s",path);
int isError=(int)ShellExecute(NULL, "open", "rundll32.exe ", tempStr, "", SW_SHOW);
if (isError<32)
{
MessageBox("相應文件打開失敗","提示");
}
}
else
{
MessageBox("文件路徑有誤!");
}