Is Drawing in Console Programs Possible?

I need to be able to draw lines and circles of different colors
for my college computer class. I have yet to learn MFC so I am
resorting to doing this in the console. I'm using VC6. Thanks!

Comments

  • I wouldn't advise using MFC to do art even if you did know it. I'm sure their is some way you could use the GDI (the GDI is very slow) in console (since MSVC's consoles are just a Mock up of DOS, while actually using windows). Or, if you have the time, learn a good graphics API such as DirectX (2D/3D, Windows) or OpenGL (2D/3D, Most every OS).

    Doing primitives such as lines and circles in either API is pretty hard, since both of them are meant to be used for high performance graphics they try not to depend on the CPU and more on the video card. You can always make textures at run time and use them though...

    Here are some resources:
    DirectX:
    http://msdn.microsoft.com/directx

    OpenGL:
    http://www.opengl.org
    http://nehe.gamedev.net/opengl.asp

  • : I need to be able to draw lines and circles of different colors
    : for my college computer class. I have yet to learn MFC so I am
    : resorting to doing this in the console. I'm using VC6. Thanks!

    You cannot draw graphics in a console window. You are best off learning graphics programming using the API. See http://sunlightd.tripod.com/Windows/.
    --
    [italic][blue]Sunlight[/blue][/italic]


  • : : I need to be able to draw lines and circles of different colors
    : : for my college computer class. I have yet to learn MFC so I am
    : : resorting to doing this in the console. I'm using VC6. Thanks!
    :
    : You cannot draw graphics in a console window. You are best off learning graphics programming using the API. See http://sunlightd.tripod.com/Windows/.
    : --
    : [italic][blue]Sunlight[/blue][/italic]
    :
    :
    Argh!!! My professor claims you can find functions that work for DOS that will do lines and circles! APIs are fun and all but is there really nothing that will do circles and lines the way built in Pascal functions can do? I'm gonna fail...

  • : Argh!!! My professor claims you can find functions that work for DOS that will do lines and circles! APIs are fun and all but is there really nothing that will do circles and lines the way built in Pascal functions can do? I'm gonna fail...

    You can for DOS, but VC++ cannot create DOS applications.

    If you want to use the BGI, there is a port of it to Windows. See http://sunlightd.tripod.com/Windows/FAQ.html#PortDOS.
    --
    [italic][blue]Sunlight[/blue][/italic]


  • : : I need to be able to draw lines and circles of different colors
    : : for my college computer class. I have yet to learn MFC so I am
    : : resorting to doing this in the console. I'm using VC6. Thanks!
    :
    : You cannot draw graphics in a console window. You are best off learning graphics programming using the API. See http://sunlightd.tripod.com/Windows/.
    : --
    : [italic][blue]Sunlight[/blue][/italic]
    :
    : there is a header file you can get form the game "arena evolution" in the game development section. there are 2 files:
    msoftcon.h
    msoftcon.cpp

    these files let you draw lines, circles, text color, background color and a few other things. i use it because i am starting too. it is the first thing i have found that even comes close. hope this helps.


  • : : : I need to be able to draw lines and circles of different colors
    : : : for my college computer class. I have yet to learn MFC so I am
    : : : resorting to doing this in the console. I'm using VC6. Thanks!

    : :
    : : there is a header file you can get form the game "arena evolution" in the game development section. there are 2 files:
    : msoftcon.h
    : msoftcon.cpp
    :
    : these files let you draw lines, circles, text color, background color and a few other things. i use it because i am starting too. it is the first thing i have found that even comes close. hope this helps.
    :
    : SORRY!!!!!!!! its not in programmers heaven. its at
    www.planet-source-code.com

    this is the exact link:
    http://www.planet-source-code.com/xq/ASP/txtCodeId.1120/lngWId.3/qx/vb/scripts/ShowCode.htm


  • I downloaded the source from that site but it won't compile on in my complier. It says no errors but it also says file size is 0 and it won't execute...oh well screw it.

  • : : : there is a header file you can get form the game "arena evolution" in the game development section. there are 2 files:
    : : msoftcon.h
    : : msoftcon.cpp

    This isn't graphics, though - it's merely text characters placed at different parts of the screen to draw lines, circles, etc.
    --
    [italic][blue]Sunlight[/blue][/italic]


  • the 2 files are for Visual C++ not for Borland. Maybe thats y it wont compile. works just fine for me.



  • your right, I need msvc++ really bad

  • : I need to be able to draw lines and circles of different colors
    : for my college computer class. I have yet to learn MFC so I am
    : resorting to doing this in the console. I'm using VC6. Thanks!
    :
    Well...i don't know if this is what your prof wants but in a dos program you must include graphics.h and the line and circle statements will draw....surprise....lines and circles. The format for the line statement is line(beginx, beginy, endx, endy). To create a dos program in VC++6 use a console app and i find that the only way to get it to compile is to tell it to create a basic hello world program. Just delete most of their code and add yours. Here's a link to a program that was inspired by my programming teacher and is an excelent exaple of the line function.
    http://www.planetsourcecode.com/xq/ASP/txtCodeId.1191/lngWId.3/qx/vb/scripts/ShowCode.htm

    Hope this helps and let me know what you think
    Peace out

    P.S. This was written in turbo c++, i'm not real skilled with vc++ but you should be able to get it to work using the technique i described above.



  • : To create a dos program in VC++6 use a console app

    A console application is not a DOS application. Why do I have to tell this to so many people?

    http://sunlightd.tripod.com/Windows/FAQ.html#IntroConsole
    --
    [italic][blue]Sunlight[/blue][/italic]


  • : : To create a dos program in VC++6 use a console app
    :
    : A console application is not a DOS application. Why do I have to tell this to so many people?
    :
    : http://sunlightd.tripod.com/Windows/FAQ.html#IntroConsole
    : --
    : [italic][blue]Sunlight[/blue][/italic]
    :
    :

    Sunlight is right, Console is not DOS but you CAN FINALLY use grafiX-function in a console.

    There is a book out which is called (translation from German)

    -> Win32 System-Progeamming

    Within this book is a chapter how to use GDI-Functions in a Console-App.

    RockNix///



  • : : : To create a dos program in VC++6 use a console app
    : :
    : : A console application is not a DOS application. Why do I have to tell this to so many people?
    : :
    : : http://sunlightd.tripod.com/Windows/FAQ.html#IntroConsole
    : : --
    : : [italic][blue]Sunlight[/blue][/italic]
    : :
    : :
    :
    : Sunlight is right, Console is not DOS but you CAN FINALLY use grafiX-function in a console.
    :
    : There is a book out which is called (translation from German)
    :
    : -> Win32 System-Progeamming
    :
    : Within this book is a chapter how to use GDI-Functions in a Console-App.
    :
    : RockNix///
    :

    Okay, I hear you have to use graphics.h but I do not have Turbo C++ I have VC6. I said
    before that I don't have time to get into Win32 or MFC...is it possible to get one of you
    to give me code to set me up for Win32 so I can do lines and circles?
    :
    :


  • : Okay, I hear you have to use graphics.h but I do not have Turbo C++ I have VC6. I said
    : before that I don't have time to get into Win32 or MFC...is it possible to get one of you
    : to give me code to set me up for Win32 so I can do lines and circles?

    Use the WinBGI library, as referenced in the FAQ.

    http://sunlightd.tripod.com/Windows/FAQ.html#ConsoleGraphics
    --
    [italic][blue]Sunlight[/blue][/italic]


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories