Solved

calling an adobe pdf file from code

Posted on 2000-04-24
5
221 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
  • 3
5 Comments
 
LVL 22

Accepted Solution

by:
nietod earned 50 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

ScreenConnect 6.0 Free Trial

Explore all the enhancements in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

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

Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
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 viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

831 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