VC如何调用默认adobe reader来打开PDF文件?高手请进
ediex 2007-03-20 02:30:16 我在菜单有一项是"帮助",点击它可以打开D:\HELP.PDF
用默认的关联pdf扩展名的工具打开,有什么办法
下面几种方法打不开呀,用WinExec打开是打开方式对话框,不是直接打开
char s[256];
CString str;
CString str2;
::GetCurrentDirectory(sizeof(s),s);
str=s;
if(str.GetAt(str.GetLength()-1)!='\\')
str+='\\';
str+="help.pdf";
str="rundll32 shell32,OpenAs_RunDLL "+str;
//ShellExecute(NULL, 'open', 'http://www.neu.edu.cn', NULL, NULL, SW_SHOWNORMAL);
////ShellExecute(NULL,"open",str2,NULL,NULL,SW_SHOWNORMAL);
//WinExec(str,SW_SHOWNORMAL );
CString filename(".\\help.pdf");
ShellExecute(NULL,"open",filename,"nil","nil",SW_SHOWMAXIMIZED);