calling an adobe pdf file from code

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
rampage09Asked:
Who is Participating?
 
nietodConnect With a Mentor Commented:
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
 
nietodCommented:
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
 
rampage09Author Commented:
Thanks!  Thats just what I needed.
0
 
Ernest022699Commented:
nietod: I hope you get residual points every time somebody reads your answer!
0
 
nietodCommented:
Regretabley no.  Its been discussed, but was not choosen for implimentation.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.