Open PDF file in Acrobat Reader

This forum can be used to talk about general design strategies, new ideas and questions in general related to wxWidgets. If you feel your questions doesn't fit anywhere, put it here.
Post Reply
mispunt
Experienced Solver
Experienced Solver
Posts: 59
Joined: Tue Oct 19, 2004 3:23 pm
Location: Ede, Holland

Open PDF file in Acrobat Reader

Post by mispunt » Mon Apr 11, 2005 5:37 pm

I need to open a PDF file in Acrobat Reader when pushing on a button (on Windows with wxWidgets). I've searched, but couldn't find how I could open other programs..
Any hints?

ddaeschl
Knows some wx things
Knows some wx things
Posts: 41
Joined: Wed Oct 27, 2004 6:06 pm
Location: Western NY
Contact:

Post by ddaeschl » Mon Apr 11, 2005 6:01 pm

I think you could use a combination of wxMimeTypesManager (wxMimeTypesManager::GetFileTypeFromExtension) and/or wxFileType to retrieve the application that should open a given mime type (such as a pdf doc) for whatever operating system you are on, and then launch that program.

mispunt
Experienced Solver
Experienced Solver
Posts: 59
Joined: Tue Oct 19, 2004 3:23 pm
Location: Ede, Holland

Post by mispunt » Mon Apr 11, 2005 6:46 pm

Perhaps it is a stupid quetion, but HOW do I launch that program?

ddaeschl
Knows some wx things
Knows some wx things
Posts: 41
Joined: Wed Oct 27, 2004 6:06 pm
Location: Western NY
Contact:

Post by ddaeschl » Mon Apr 11, 2005 8:30 pm

Check out wxExecute (::wxExecute) for information on launching applications.

And always remember that the only stupid question is the one you don't ask.

:)

mispunt
Experienced Solver
Experienced Solver
Posts: 59
Joined: Tue Oct 19, 2004 3:23 pm
Location: Ede, Holland

Post by mispunt » Mon Apr 11, 2005 9:31 pm

ddaeschl wrote:Check out wxExecute (::wxExecute) for information on launching applications.

And always remember that the only stupid question is the one you don't ask.

:)
It works, thanks... Now I only need to view a word document inside the program... :lol:

Post Reply