UltraMAX Posted July 15, 2004 Share Posted July 15, 2004 Hi, i've got a question about graphics in Visual C++ (Console Mode), i can change the text color and the cursor position, but it is possible to draw a rectangle, a triangle or a circle too? If it is possible can someone explain me how can i do that please?? Thanks UltraMAX Link to comment Share on other sites More sharing options...
0 GatorV Posted July 15, 2004 Share Posted July 15, 2004 You need to get your hands on a conio.h file of a Borland compiler, it has all of that functions for standard drawing, I don't know if it works with circles or triangles but lines a squares are drawn :D. The conio.h from Visual C++ doesn't have support for these functions, or are implemented in a different way :p Link to comment Share on other sites More sharing options...
0 UltraMAX Posted July 15, 2004 Author Share Posted July 15, 2004 Sorry GatorV, but i know that, see, someone told me first for the impossibility to change the texcolor or to change the cursor position under Visual C++ because the Conio.h didn't support that functions. But truth it's the Conio.h didn't support them, but the Windows.h file support them, so i think, if it support them, maybe it's also possible to draw a rectangle or a circle too .... are you sure about this? Sorry for my bad english and forgive me if i'm boring you, but i'm new guy in the "code world" :blush: Thanks UlraMAX Link to comment Share on other sites More sharing options...
0 GatorV Posted July 15, 2004 Share Posted July 15, 2004 Not a problem :D , the window.h it's only for the win32 enviroment, I checked the conio.h that comes with borland compilers (not the new one) and it has some basic drawing, you should try to find one and see if it suits you, also because you can now have modern graphics like DirectX or OpenGL, that why DOS graphics has been deprecated :cool: Link to comment Share on other sites More sharing options...
0 UltraMAX Posted July 15, 2004 Author Share Posted July 15, 2004 Yes, but right now i'm starting studing C language and i don't know (for now) C++ nether the powerfull Visual C++, then when i know to work with them both maybe i can do some nice graphics :D ... but my math ... it's also not good :( Many thanks for answer me man! Cheers UltraMAX Link to comment Share on other sites More sharing options...
0 LordOfLA Posted July 23, 2004 Share Posted July 23, 2004 hmm. I'm assuming from your wish to draw circles and triangles you want to be drawing stuff that doesnt use ascii drawing characters. If thats the case you'll want to look up for information on DOS graphic programming for accessing graphics mode at the console. things to look at maybe include VGA DOS VESA etc on google. Ascii linedrawing is easy however but you are limited to boxes by nature of the dos font. I'm a little rusty on my c prorammign as I've not done any in 6 years but it shouldbe easy to lookup on google eitherway. Link to comment Share on other sites More sharing options...
0 John Veteran Posted July 23, 2004 Veteran Share Posted July 23, 2004 cout << "+---------+"; cout << "| |"; cout << "| |"; cout << "+---------+"; :whistle: Link to comment Share on other sites More sharing options...
0 caustiK Posted July 23, 2004 Share Posted July 23, 2004 cout << "+---------+"; cout << "| |"; cout << "| |"; cout << "+---------+"; :whistle: heh, nice try, but that's just a funny line :p Link to comment Share on other sites More sharing options...
0 John Veteran Posted July 24, 2004 Veteran Share Posted July 24, 2004 Oh :p I forgot the "endl;" :pinch: I'm used to writing Console.WriteLine() if anything :whistle: I normally don't do console programming, Windows Forms for me! :D Link to comment Share on other sites More sharing options...
0 Hosiah Posted July 27, 2004 Share Posted July 27, 2004 Yes, but right now i'm starting studing C language and i don't know (for now) C++ nether the powerfull Visual C++, thenwhen i know to work with them both maybe i can do some nice graphics ... but my math ... it's also not good I can relate. Not long ago, I, too, wanted simple console graphics in C++. It took weeks, literally, to find the only site that had "graphics.h" and "mingw.h" that would work with my setup. By the time I finally got going with it, it hardly seemed worth the effort. Then, I discovered OpenGL. Like you, I had been saying "no, that sounds way too complicated for me!", but once I found the FANTASTIC tutorials at NeHe's site, I was doing all kinds of graphics in no time. The tutorials at this site are simple to follow, the sample code is well-commented, and in a week I had my own cool little 3d-environment (albeit, it runs slo-o-w on my system!)(and OK, it seemed cool to ME, cuz they were MY bitmaps pasted onto MY polygon archetecture...) to run around in. Doing all this one raster line at a time seems like it would be ludicrous! I'm much happier doing graghics in OpenGL, now that I've gotten to try it! -Hosiah PS I'm still pretty noob myself, I'm sure the more experienced on this board may have something to add (or even correct!) Link to comment Share on other sites More sharing options...
Question
UltraMAX
Hi, i've got a question about graphics in Visual C++ (Console Mode), i can change the text color and the cursor position, but
it is possible to draw a rectangle, a triangle or a circle too? If it is possible can someone explain me how can i do that please??
Thanks
UltraMAX
Link to comment
Share on other sites
9 answers to this question
Recommended Posts