Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. How to start a file's application in C++

How to start a file's application in C++

Scheduled Pinned Locked Moved C / C++ / MFC
c++helptutorialquestion
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Anonymous
    wrote on last edited by
    #1

    I have a help file that I wrote and saved as a .pdf file. I want to be able to click a help button and have the file pop-up in Acrobat reader. I have coded a system command as follows: system("start help.pdf"); and this works but it is slow and always pops up a DOS command window. Is there a better way to do this?

    S S 2 Replies Last reply
    0
    • A Anonymous

      I have a help file that I wrote and saved as a .pdf file. I want to be able to click a help button and have the file pop-up in Acrobat reader. I have coded a system command as follows: system("start help.pdf"); and this works but it is slow and always pops up a DOS command window. Is there a better way to do this?

      S Offline
      S Offline
      Scott H Settlemier
      wrote on last edited by
      #2

      use the windows shell: ShellFileExecute

      1 Reply Last reply
      0
      • A Anonymous

        I have a help file that I wrote and saved as a .pdf file. I want to be able to click a help button and have the file pop-up in Acrobat reader. I have coded a system command as follows: system("start help.pdf"); and this works but it is slow and always pops up a DOS command window. Is there a better way to do this?

        S Offline
        S Offline
        Sujan Christo
        wrote on last edited by
        #3

        Can use ShellExecuteEx / ShellExecute. Have a look @ MSDN

        A 1 Reply Last reply
        0
        • S Sujan Christo

          Can use ShellExecuteEx / ShellExecute. Have a look @ MSDN

          A Offline
          A Offline
          Anonymous
          wrote on last edited by
          #4

          Thanks, this works great!:)

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups