使用vc ++打开pdf文件 [英] open pdf file using vc++

查看:500
本文介绍了使用vc ++打开pdf文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从vc ++打开pdf文件.当我单击按钮时,pdf文件应在Adobe中打开. any1可以帮助我吗?

i want to open pdf file from vc++. when i click on to the button the pdf file should get open in adobe. can any1 help me

推荐答案

看这里:
http://www.experts-exchange.com/Programming/System/Windows__Programming/MFC/Q_20486767.html [ ^ ]
它说:
将ShellExecute与pdf文件上的open参数一起使用.这将在用户与pdf关联的任何查看器中打开pdf文件.
Look here:
http://www.experts-exchange.com/Programming/System/Windows__Programming/MFC/Q_20486767.html[^]
It says:
Use ShellExecute with the open parameter on the pdf file. This will open the pdf file in whatever viewer the user has associated with pdf.
ShellExecute(NULL, "open", "C:\\Program Files\\Adobe\\Acrobat 5.0\\Help\\ENU\\DocBox.pdf", NULL, NULL, SW_SHOW);


尝试!


ty ...效果很好.感谢您的帮助
一个补充...如果ShellExecute给您任何错误,则只需#include"shellapi.h" :-D
ty ...it worked fine ..thanks for the help
one addition to that ...if ShellExecute giving u any error then just #include "shellapi.h" :-D


这篇关于使用vc ++打开pdf文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆