Solved

graphics for VC++ and borlan C++ B

Posted on 1998-08-31
5
221 Views
Last Modified: 2010-04-02
G'day,
I am wondering if there is anyway to use VC++ or Borlan C++ builder to generate DOS graphics. By this i mean, i need a method of setting the screen mode (13h if im not mistaken) in the above programs and being able to draw from one point to another.
(this is for a dos aplication, i dont think that Borland c++ builder can do it but i think that VC++ might)
Thanks,
Andrew
0
Comment
Question by:galdes
5 Comments
 
LVL 23

Expert Comment

by:chensu
ID: 1171793
A DOS program or a Windows program? If it is a Windows program, you can't use the DOS interrupt 10H to set the screen mode. I don't know what you are going to do. You may use the ChangeDisplaySettings function to change the display settings. Alternatively, you can use DirectX.
0
 

Author Comment

by:galdes
ID: 1171794
Edited text of question
0
 
LVL 23

Expert Comment

by:chensu
ID: 1171795
Visual C++ 1.52 or earlier can generate DOS programs. I remember DOS interrupt 10H is for display.
0
 
LVL 1

Expert Comment

by:bsimser
ID: 1171796
Like chensu said, Visual C++ 1.52 or earlier can generate DOS programs. You can use any interrupt functions (int86x() etc) or asm to do graphics this way. Versions after that are Windows only and Visual C 5 or higher will only generate 32bit apps. You'll have to use DirectX if you want highspeed graphics this way. Builder can create a console mode application which is really just a DOS program. It comes with a main() and you can call any standard C functions. If you want to do DOS graphics you might want to look at DJGPP and Allegro or possibly Borland C 3.xx with BGI. Depends on what kind of graphics you're trying to do.
0
 
LVL 14

Accepted Solution

by:
AlexVirochovsky earned 50 total points
ID: 1171797
My answer for Borland C++.
1. All version of Borland C/C++(from 3 to 5) support Dos mode
2. For use use must make Dos project, incluse in you main
programm : #incluse  <graphics.j> and use functions
lise initgraph, graphresult, line, move and so on!
During initgraph you can chouse mode:
DETECT: auto detect graph mode
or (as i make) specify you mode.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now