Solved

graphics for VC++ and borlan C++ B

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
C++ standard library based binary archive format 6 104
typedef std::deque<BYTE> ByteVector is broken in vs2012 23 88
Safe conversion? 4 72
C++ mouse_event mouse look 7 99
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

821 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