Solved

calling an adobe pdf file from code

Posted on 2000-04-24
5
232 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 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Which Linux flavors will this run on? 6 102
Embarcadero C++ builder XE10.1 Berlin TRegistry declaration 1 48
Android development question 2 78
boost::uuid crashes 17 38
When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

756 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