Solved

graphics for VC++ and borlan C++ B

Posted on 1998-08-31
5
226 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying 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

In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
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…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

717 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