Link to home
Start Free TrialLog in
Avatar of noumanbinishaq
noumanbinishaq

asked on

How can I use Graphics Library in VC6.0 for consol Applications

I want to use consol graphic functions in VC6.0,
like in Borland C++ there is a library(graphics.h).

If any one knows ,plz tell me or email me some graphics file.

Also some people use (msoftcon.h) for this purpose.
If any one have ,plz maail me.

Thanx
Avatar of fl0yd
fl0yd

What functionality are you looking for in particular? The win32 API provides a lot of drawing related functions, aka GDI [graphical device interface]. For time critical and more complex graphics, MS provides DirectX and the accompanying SDK.

.f
console graphics using vc6.0? never heard anyone tried it. you've got better options to choose from:

o GDI (Graphics Device Interface)
o DirectGraphics (DirectX3D + DirectDraw)
o OpenGL
o Allegro
o Etcetera (hehe).

note that they're not as simple as borland's graphics.h is (but they perform better! which is what's important...;).
you mean like they use to do before Windows?  
Using graphics.lib?
I don't know how it would work in Windows, since the graphics.h file is not part of VC++.

The older MS C 6.0 compiler had all the support for this but VC++ 6 does not.  There is a demo app in the MSDN that show how to launch a dialog from a console app.

Look for: ConGui: Sample for Console I/O with GUI I/O

Jim
Avatar of noumanbinishaq

ASKER

If any one have a file "msoftcon.h" and "msoftcon.cpp"
,plz mail me. I know how to use it.

Thanx
Nouman
ASKER CERTIFIED SOLUTION
Avatar of fl0yd
fl0yd

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Than you very much  fl0yd.
I have got.
Just out of curiosity: what are you going to use console graphics for? At any rate, I stumbled across those links that illustrate what console graphics *can* be used for. Since nomad "never heard anyone tried it", those may be interesting for him too -- no offense intended, but putting together a 3D render kernel is rather simple in comparison to this:

http://taat.fi/tmdc/demos/superkiller.zip
http://taat.fi/tmdc/demos/pp_contact.zip
http://taat.fi/tmdc/tmdc5inv.zip [source code included]

Have fun watching...

.f
noumanbinishaq said that he/she wanted to use a library similar to graphics.h in the old borland compilers, so i suggested alternatives for him/her to use vc6.0. if floyd has tried graphics.h, then the idea of a 3d render kernel shouldn't even get into his head because it's slow -- which is, again, why i suggested alternatives. but if floyd is implying that he has seen someone do DOS graphics using vc6.0, then i can't do anything about it.

-- no offense intended.
oh yeah, i've created my own 3d graphics library back then to replace graphics.h -- just in case floyd wanted to know.
nomad,
    let me set a few things straight that you seem to be confusing: console graphics is *NOT* necessarily the same as a DOS program. The links I posted above do not even run in a DOS environment -- they are pure win32 console applications. Too many coders do still seem to confuse those two application types.
    I'm not quite sure where you think I said anything about realtime-graphics. As a matter of fact I never even talked about speed, neither explicitly nor implicitly. Anyway, I looked into msoftcon.cpp, compiled a few tests with it and figured that there must be faster ways to render console graphics. That's why I posted a link to the "Text Mode Demo Competition 5" invitation with source code included. If you checked those apps out, then I don't know what makes you still think that realtime-3D-rendering wouldn't be possible. Then again, looking at the screenshots at your homepage, performance doesn't seem to be anything you are able to deliver anyway. Again, this isn't a personal attack but rather a fact.
    To make the point I was trying to get across a bit easier to grasp: I was comparing the complexity of tasks necessary to display 3D graphics using modern 3D hardware and appropriate libraries to pure text mode rendering. In response to your remark, that you "never heard anyone tried it" I addressed you personally, since it seems to be possible to do -- and looking at the above links with quite some visually appealing results, too.

.f
floyd,
let me say this again, noumanbinishaq said that he/she wanted a library SIMILAR to graphics.h in the old borland compilers. graphics.h provide a poor but real-time graphics.

look at my alternatives, do you see me pointing to anything other than real-time graphics? no.

and yes, i KNOW that DOS is different from console, believe it or not. but the easiest way to do graphics from console is to follow what one might have known previously while working in DOS.

ok?