Solved

graphics for VC++ and borlan C++ B

Posted on 1998-08-31
5
223 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…

772 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