programing in DOS?

This is a discussion on programing in DOS? within the C++ Programming forums, part of the General Programming Boards category; Originally Posted by ChaosEngine well you could redirect stdout to a window! it also goes to visual studio's output window ...

  1. #31
    Registered User
    Join Date
    Aug 2005
    Posts
    1,267
    Quote Originally Posted by ChaosEngine
    well you could redirect stdout to a window! it also goes to visual studio's output window (useful for debug logging), but as I said, that's a nit.
    but that is a console window, not a gui window such as one that might be created using this tutorial.

  2. #32
    semi-colon generator ChaosEngine's Avatar
    Join Date
    Sep 2005
    Location
    Chch, NZ
    Posts
    597
    Quote Originally Posted by Ancient Dragon
    but that is a console window, not a gui window such as one that might be created using this tutorial.
    so what? it's still a window in a gui. it just happens to display a console. you're making a distinction where none exists. I could redirect stdout out to a dialog box (such as one that might be created using that tutorial)in my app if I wanted. Hell you could redirect stdout to and display it as rotating 3d text in a directx app (it'd be slow as hell, but technically it's possible)
    "I saw a sign that said 'Drink Canada Dry', so I started"
    -- Brendan Behan

    Free Compiler: Visual C++ 2005 Express
    If you program in C++, you need Boost. You should also know how to use the Standard Library (STL). Want to make games? After reading this, I don't like WxWidgets anymore. Want to add some scripting to your App?

  3. #33
    Registered User
    Join Date
    May 2006
    Location
    irc.abstracttech.com
    Posts
    8
    how do you guys put signatures?

  4. #34
    Registered User whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    7,666
    Edit your member profile in your control panel (User CP).

  5. #35
    Registered User
    Join Date
    Aug 2005
    Posts
    1,267
    Quote Originally Posted by ChaosEngine
    so what? it's still a window in a gui. it just happens to display a console. you're making a distinction where none exists. I could redirect stdout out to a dialog box (such as one that might be created using that tutorial)in my app if I wanted. Hell you could redirect stdout to and display it as rotating 3d text in a directx app (it'd be slow as hell, but technically it's possible)
    The proof is in the pudding -- show us an example of doing that please. After creating the window, how do you redirect stdout to that window so that I can use printf() and the output will go to that window?
    Last edited by Ancient Dragon; 05-30-2006 at 06:24 PM.

  6. #36
    Registered User
    Join Date
    May 2006
    Location
    irc.abstracttech.com
    Posts
    8
    @citizen, i cant seem to find a place where i can edit my signature.

  7. #37
    The Richness... Richie T's Avatar
    Join Date
    Jan 2006
    Location
    Ireland
    Posts
    469
    First, you obviously need to be signed in. Then underneath the
    current path of the thread you're in, there should be a link for
    "User CP." For example, as I type this reply, the path is:

    C Board > General Programming Boards > C++ Programming >
    programing in DOS?

    directly under the C Board part it says Reply to Thread (Because
    that's what I'm doing). Then under that it says User CP. Click
    that, and it should say edit signature along the left.
    No No's:
    fflush (stdin); gets (); void main ();


    Goodies:
    Example of fgets (); The FAQ, C/C++ Reference


    My Gear:
    OS - Windows XP
    IDE - MS Visual C++ 2008 Express Edition


    ASCII stupid question, get a stupid ANSI

  8. #38
    Registered User
    Join Date
    May 2006
    Location
    irc.abstracttech.com
    Posts
    8
    hmmm theres no icon called edit signature.

    not enough posts mayb?

  9. #39
    The Richness... Richie T's Avatar
    Join Date
    Jan 2006
    Location
    Ireland
    Posts
    469
    On the Left Hand Side it should say Control Panel. Under that it
    should say Settings and Options. Directly under that it should
    have Edit Signature - I don't think posts have anything to do
    with it.
    No No's:
    fflush (stdin); gets (); void main ();


    Goodies:
    Example of fgets (); The FAQ, C/C++ Reference


    My Gear:
    OS - Windows XP
    IDE - MS Visual C++ 2008 Express Edition


    ASCII stupid question, get a stupid ANSI

  10. #40
    semi-colon generator ChaosEngine's Avatar
    Join Date
    Sep 2005
    Location
    Chch, NZ
    Posts
    597
    Quote Originally Posted by Ancient Dragon
    The proof is in the pudding -- show us an example of doing that please. After creating the window, how do you redirect stdout to that window so that I can use printf() and the output will go to that window?
    I don't have an example here and I don't have time to write one, but you can have a look at this code project article to get an idea. that's for C++ cout.

    for C printf, look into the freopen function.
    "I saw a sign that said 'Drink Canada Dry', so I started"
    -- Brendan Behan

    Free Compiler: Visual C++ 2005 Express
    If you program in C++, you need Boost. You should also know how to use the Standard Library (STL). Want to make games? After reading this, I don't like WxWidgets anymore. Want to add some scripting to your App?

  11. #41
    Registered User
    Join Date
    May 2006
    Posts
    34
    I recently made a GUI helper dll.
    Right now it has functions to.
    Make Windows
    Add Text Area's
    Add Text Input Areas
    Buttons
    MsgBox's
    Its basic but it make it a bit faster pm if anyone wants to try it out.
    Its Really All up to you.

  12. #42
    Registered User
    Join Date
    Aug 2005
    Posts
    1,267
    Thanks for that codeproject link -- but just as I suspected there is a great deal more to it than just simple redirection.

Page 3 of 3 FirstFirst 123
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. File systems?? (Winxp -> DOS)
    By Shadow in forum Tech Board
    Replies: 4
    Last Post: 01-06-2003, 08:08 PM
  2. winver, winminor, winmajor can it be found from dos?
    By ronin in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 10-02-2002, 10:32 AM
  3. real mode dos & win dos
    By scott27349 in forum A Brief History of Cprogramming.com
    Replies: 26
    Last Post: 08-19-2002, 06:15 AM
  4. DOS program versus DOS console program
    By scromer in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 01-10-2002, 12:42 PM
  5. Shut off DOS screen automatically to Windows
    By Unregistered in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 11-08-2001, 06:14 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21