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 close the current program and starting another on exit

How to close the current program and starting another on exit

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestionannouncement
3 Posts 3 Posters 11 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.
  • J Offline
    J Offline
    Joep
    wrote on last edited by
    #1

    Hi, I would like to know how I exit a program (the way it should) and than run another program. I'm planning to use this after a user has downloaded an update from within the program and than letting him start the update. For that, the running program has to be closed. Could anyone give me a suggestion?

    H 1 Reply Last reply
    0
    • J Joep

      Hi, I would like to know how I exit a program (the way it should) and than run another program. I'm planning to use this after a user has downloaded an update from within the program and than letting him start the update. For that, the running program has to be closed. Could anyone give me a suggestion?

      H Offline
      H Offline
      Henk Devos
      wrote on last edited by
      #2
      1. call CreateProcess to start the other program 2) In a user interface program (i suppose that's what you are writing), call PostQuitMessage. ================== The original message was: Hi,

      I would like to know how I exit a program (the way it should) and than run another program.

      I'm planning to use this after a user has downloaded an update from within the program and than letting him start the update. For that, the running program has to be closed.

      Could anyone give me a suggestion?

      L 1 Reply Last reply
      0
      • H Henk Devos
        1. call CreateProcess to start the other program 2) In a user interface program (i suppose that's what you are writing), call PostQuitMessage. ================== The original message was: Hi,

        I would like to know how I exit a program (the way it should) and than run another program.

        I'm planning to use this after a user has downloaded an update from within the program and than letting him start the update. For that, the running program has to be closed.

        Could anyone give me a suggestion?

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        Yep, that's it, thanks.

        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