[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

calling an adobe pdf file from code

Posted on 2000-04-24
5
Medium Priority
?
247 Views
Last Modified: 2010-04-02
I would like to click a button on my dialog box which will display a help file in pdf format.  So, essientially I would like my button to work like a link to a pdf file on a web page, and have the acrobat reader pop-up and display the pdf file.  I know it sounds simple but...

Thanks
0
Comment
Question by:rampage09
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 22

Accepted Solution

by:
nietod earned 200 total points
ID: 2745221
In windows you can use the ShellExecute() windows API function to do this.  It will look at the extension of the specified file (.pdf) and will use that to find a program that can open that file (probably adobe acrobat) and will execute the program and pass it the specified file name.  

Let me know if you have any questions.
0
 
LVL 22

Expert Comment

by:nietod
ID: 2745235
An example might be

ShellExecute(DlgHnd,NULL,"C:\\SOMEPATH\\SOMEFILE.PDF",NULL,"C:\\SOMEPATH",0);

where DlgHnd is the handle to your dialog window.
0
 

Author Comment

by:rampage09
ID: 2747571
Thanks!  Thats just what I needed.
0
 
LVL 1

Expert Comment

by:Ernest022699
ID: 2877424
nietod: I hope you get residual points every time somebody reads your answer!
0
 
LVL 22

Expert Comment

by:nietod
ID: 2877575
Regretabley no.  Its been discussed, but was not choosen for implimentation.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question