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 can I launch another application( like notepad.exe ) in my VC

how can I launch another application( like notepad.exe ) in my VC

Scheduled Pinned Locked Moved C / C++ / MFC
algorithmsjsonquestion
7 Posts 5 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.
  • L Offline
    L Offline
    LeeeNN
    wrote on last edited by
    #1

    I want launch another application, like notepad.exe or xxx.bat, in my VC application. I knew there is API can do it. but after searching on Web I could not find it. Please tell me what API is it. Thank you. Richard

    M M 2 Replies Last reply
    0
    • L LeeeNN

      I want launch another application, like notepad.exe or xxx.bat, in my VC application. I knew there is API can do it. but after searching on Web I could not find it. Please tell me what API is it. Thank you. Richard

      M Offline
      M Offline
      Mark Salsbery
      wrote on last edited by
      #2

      One way is to use CreateProcess()[^] Mark

      Mark Salsbery Microsoft MVP - Visual C++ "Thanks,I overlooked the docs."

      M 1 Reply Last reply
      0
      • M Mark Salsbery

        One way is to use CreateProcess()[^] Mark

        Mark Salsbery Microsoft MVP - Visual C++ "Thanks,I overlooked the docs."

        M Offline
        M Offline
        mid 5741
        wrote on last edited by
        #3

        or ShellExecute() or _spawn().

        M 1 Reply Last reply
        0
        • M mid 5741

          or ShellExecute() or _spawn().

          M Offline
          M Offline
          Mark Salsbery
          wrote on last edited by
          #4

          Yeah - I chose the first link I saw that had info on running both exes and batch files ;P Cheers, MArk

          Mark Salsbery Microsoft MVP - Visual C++ "Thanks,I overlooked the docs."

          1 Reply Last reply
          0
          • L LeeeNN

            I want launch another application, like notepad.exe or xxx.bat, in my VC application. I knew there is API can do it. but after searching on Web I could not find it. Please tell me what API is it. Thank you. Richard

            M Offline
            M Offline
            Michael Dunn
            wrote on last edited by
            #5

            See the FAQ 6.4 How do I run another program from my program?[^]

            --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ

            L 1 Reply Last reply
            0
            • M Michael Dunn

              See the FAQ 6.4 How do I run another program from my program?[^]

              --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ

              L Offline
              L Offline
              LeeeNN
              wrote on last edited by
              #6

              This link is pretty helpful. thank for all your guys' answer.:rose:

              H 1 Reply Last reply
              0
              • L LeeeNN

                This link is pretty helpful. thank for all your guys' answer.:rose:

                H Offline
                H Offline
                Hamid Taebi
                wrote on last edited by
                #7

                Or you can use of WinExec.


                WhiteSky


                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