?
Solved

calling an adobe pdf file from code

Posted on 2000-04-24
5
Medium Priority
?
242 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

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
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 how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
Suggested Courses

743 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