> I've written a "user's manual" for my application and
> converted it into a PDF. I'd like to "link" to it from the
> Help menu (Fl_Menu_Bar) on my app. So far, I've done it with
> system("Manual.pdf") which is really awful. It opens a
> console and loads the PDF but it seems to take ages and it
> renders the app unusable until I close the PDF reader.
>
> How would you do this (in WIN32)?
Probably via CreateProcess(...) although it's usage confuses me, too
many parameters... Or maybe via ShellExecute(...) (ditto on its params
though!)
> Bonus question: How would you do it multi-platform? :)
I don't think there is a one size fits all solution, but the *nix-like
systems (linux, OSX, etc...) can probably all fork and exec the PDF
viewer process, so a few "#ifdef WIN32" hacks ought to get something
working.
That said, the file "fl_open_uri.cxx" in the fltk src dir implements
basically this mechanism, to open a set of well-known URI's (of which
PDF is not one, unfortunately!)
Should be easy enough to tweak that code to do what you want though, I
would think.
SELEX Sensors and Airborne Systems Limited
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14
3EL
A company registered in England & Wales. Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk