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. Help! How can I simulate a console in the SDI Document View

Help! How can I simulate a console in the SDI Document View

Scheduled Pinned Locked Moved C / C++ / MFC
questionhelptutorial
6 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.
  • J Offline
    J Offline
    jfk_lili
    wrote on last edited by
    #1

    Hi,Guys I want to change my console based program into a SDI program. And I have adready make it can work. But there is one critcal thing left, I don't know how to output the messages used to be displayed in the console to the SDI view. Can anyone kindly give me some hint or a sample? Thanks in advance!

    K C 2 Replies Last reply
    0
    • J jfk_lili

      Hi,Guys I want to change my console based program into a SDI program. And I have adready make it can work. But there is one critcal thing left, I don't know how to output the messages used to be displayed in the console to the SDI view. Can anyone kindly give me some hint or a sample? Thanks in advance!

      K Offline
      K Offline
      kakan
      wrote on last edited by
      #2

      Hello. I think the simplest way to do it is by creating a dialog based application. (I've done the same thing myself). For the "console", create a listbox and send the console output to it.

      J 1 Reply Last reply
      0
      • K kakan

        Hello. I think the simplest way to do it is by creating a dialog based application. (I've done the same thing myself). For the "console", create a listbox and send the console output to it.

        J Offline
        J Offline
        jfk_lili
        wrote on last edited by
        #3

        Thanks very much for your reply!! Actually instead of listbox, I have tried to use ListView under SDI, and it works fine. But now I want to switch to CRichEditView, and not sure if there will have some overflow problem. Once again thanks very much!!

        K 1 Reply Last reply
        0
        • J jfk_lili

          Thanks very much for your reply!! Actually instead of listbox, I have tried to use ListView under SDI, and it works fine. But now I want to switch to CRichEditView, and not sure if there will have some overflow problem. Once again thanks very much!!

          K Offline
          K Offline
          kakan
          wrote on last edited by
          #4

          Hello. I haven't used it, so I can't tell...:-O Good luck.

          J 1 Reply Last reply
          0
          • K kakan

            Hello. I haven't used it, so I can't tell...:-O Good luck.

            J Offline
            J Offline
            jfk_lili
            wrote on last edited by
            #5

            Hi, Thanks all the same :)

            1 Reply Last reply
            0
            • J jfk_lili

              Hi,Guys I want to change my console based program into a SDI program. And I have adready make it can work. But there is one critcal thing left, I don't know how to output the messages used to be displayed in the console to the SDI view. Can anyone kindly give me some hint or a sample? Thanks in advance!

              C Offline
              C Offline
              Calc20
              wrote on last edited by
              #6

              You don't have to simulate it, you can create a real console window using AllocConsole(). You can get a handle to it using GetStdHandle() and then write messages using WriteConsole()

              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