Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Launching Applications indirect by their registered Documents

Does anybody know how it is possible to start a PDF in Acrobat or a movie in Windows Movieplayer just by "executing" the document itself without the knowledge of where the registered Application was installed. Just as if i click on it in the Explorer, i want the proper document-viewer be displayed (of course with the document in it)

thank you

Comments

  • pingpongpingpong Posts: 937Member
    Easitest way:
    ShellExecute(hWnd, "open", "document name", NULL, SW_SHOWNORMAL)

    Replace document name with "c:\bla\bla.pdf" and Acrobat should run, replace with "http://www.bla.com" and IE should run and so forth.

    : Does anybody know how it is possible to start a PDF in Acrobat or a movie in Windows Movieplayer just by "executing" the document itself without the knowledge of where the registered Application was installed. Just as if i click on it in the Explorer, i want the proper document-viewer be displayed (of course with the document in it)
    :
    : thank you
    :

Sign In or Register to comment.