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. Write to console

Write to console

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

    I have MFC dialog application. How can I write something to current console when it is ecexuted by "cmd"? It seems AllocConsole() creates new console which is closed after program exit. Thank you.

    D 1 Reply Last reply
    0
    • R rrrado

      I have MFC dialog application. How can I write something to current console when it is ecexuted by "cmd"? It seems AllocConsole() creates new console which is closed after program exit. Thank you.

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

      What about AttachConsole()?

      "Love people and use things, not love things and use people." - Unknown

      "The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch

      R 1 Reply Last reply
      0
      • D David Crow

        What about AttachConsole()?

        "Love people and use things, not love things and use people." - Unknown

        "The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch

        R Offline
        R Offline
        rrrado
        wrote on last edited by
        #3

        It requires Windows Vista or Windows XP. I'd like to have it running on Win98 too.

        D 1 Reply Last reply
        0
        • R rrrado

          It requires Windows Vista or Windows XP. I'd like to have it running on Win98 too.

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

          rrrado wrote:

          I'd like to have it running on Win98 too.

          Sorry. I must've missed that requirement in your initial post.

          "Love people and use things, not love things and use people." - Unknown

          "The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch

          R 1 Reply Last reply
          0
          • D David Crow

            rrrado wrote:

            I'd like to have it running on Win98 too.

            Sorry. I must've missed that requirement in your initial post.

            "Love people and use things, not love things and use people." - Unknown

            "The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch

            R Offline
            R Offline
            rrrado
            wrote on last edited by
            #5

            You didn't :laugh: Ok thanks anyway :)

            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