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. Executing a console application from an SDI

Executing a console application from an SDI

Scheduled Pinned Locked Moved C / C++ / MFC
help
4 Posts 4 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.
  • K Offline
    K Offline
    krugger
    wrote on last edited by
    #1

    Hi all; I need to execute a console program when the user in my application clicks a button on my SDI dialog. Can anybody please help me to find a way how. Thank you krugger

    P D 2 Replies Last reply
    0
    • K krugger

      Hi all; I need to execute a console program when the user in my application clicks a button on my SDI dialog. Can anybody please help me to find a way how. Thank you krugger

      P Offline
      P Offline
      Prakash Nadar
      wrote on last edited by
      #2

      ShellExecute api will execute any executable, even console application.


      P.R.A.K.A.S.H

      S 1 Reply Last reply
      0
      • P Prakash Nadar

        ShellExecute api will execute any executable, even console application.


        P.R.A.K.A.S.H

        S Offline
        S Offline
        sunyou
        wrote on last edited by
        #3

        ShellExecute(this->m_hWnd,"open","calc.exe","","", SW_SHOW ); or ShellExecute(this->m_hWnd,"open","notepad.exe", "c:\\MyLog.log","",SW_SHOW );

        1 Reply Last reply
        0
        • K krugger

          Hi all; I need to execute a console program when the user in my application clicks a button on my SDI dialog. Can anybody please help me to find a way how. Thank you krugger

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #4

          You can also use CreateProcess().


          "The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)

          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