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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. How to get cin cout in MFC dialog based application

How to get cin cout in MFC dialog based application

Scheduled Pinned Locked Moved C / C++ / MFC
c++designtutorial
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.
  • A Offline
    A Offline
    amitovoip
    wrote on last edited by
    #1

    Hi Guys I am a c++_ coder got in vc++ and MFC recently I want to make a programme which takes input on a UI dialog (what a cin does in console) and (display the output cout in console) and display same in a dialog Suggest me readings and references or a smaple code Regards Amit

    _ Q D 3 Replies Last reply
    0
    • A amitovoip

      Hi Guys I am a c++_ coder got in vc++ and MFC recently I want to make a programme which takes input on a UI dialog (what a cin does in console) and (display the output cout in console) and display same in a dialog Suggest me readings and references or a smaple code Regards Amit

      _ Offline
      _ Offline
      _AnsHUMAN_
      wrote on last edited by
      #2

      I would suggest you to buy a good book on MFC. You can take the input in an edit box and display it anywhere you wish.

      You need to google first, if you have "It's urgent please" mentioned in your question. ;-)_AnShUmAn_

      1 Reply Last reply
      0
      • A amitovoip

        Hi Guys I am a c++_ coder got in vc++ and MFC recently I want to make a programme which takes input on a UI dialog (what a cin does in console) and (display the output cout in console) and display same in a dialog Suggest me readings and references or a smaple code Regards Amit

        Q Offline
        Q Offline
        QuickDeveloper
        wrote on last edited by
        #3

        hi If u are using MFC...you can do the following Cin: 1)Put some controls in dialogbox like textbox etc. 2)Bind variables to that controls 3)When somebody types into that text control ,you can get the values into the variables using unctions like UpdateWindow etc Cout: 1)You can put a static control on dialog and display message(use SetWindowText API) 2)Use a Simple MessageBox 3)Draw Text on the dialog (not needed here) some links: http://www.flounder.com/getdlgitem.htm[^] http://msdn.microsoft.com/en-us/library/86kdbbs8.aspx[^] Hope that helps

        "Every morning I go through Forbes list of 40 richest people in the world. If my name is not in there, I go to work..!!!"

        1 Reply Last reply
        0
        • A amitovoip

          Hi Guys I am a c++_ coder got in vc++ and MFC recently I want to make a programme which takes input on a UI dialog (what a cin does in console) and (display the output cout in console) and display same in a dialog Suggest me readings and references or a smaple code Regards Amit

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

          Use SetWindowText() and GetWindowText().

          "Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown

          "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

          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