Is there a function for putting a bitmap (or otherwise) picture file on the screen in dos programming? If there is, how do you use it?
Printable View
Is there a function for putting a bitmap (or otherwise) picture file on the screen in dos programming? If there is, how do you use it?
There is not. In Win32, yes. In DOS, no.
See wotsit.com for a list of file formats, and see the FAQ here for how to use it.
that blows, now i have to learn win32 programming.
Is there a function for this in SDL or Allegro?
[EDIT]Quote:
The problem is... Graphics are not part of the ANSI/ISO C++ standard. Most compilers have at least some graphics capabilities, but their library functions are all different.
All Windows compilers have graphics functions which are part of the Windows API. There are 3rd party graphics libraries such as OpenGL.
So, the graphics experts here (not me) need to know what compiler and operating system you are using, and the format (jpeg, etc) of the scenery image you are trying to display.
In general, bitmap images are "easier" to display than GIF, or JPEG images which are encoded/compressed.
There is some graphics information here in the Programming FAQ. There are some OpenGL tutorials here.
The quote function killed the links above... Graphics Information from the FAQ and the OpenGL Tutorials
BTW - There is no sound or mouse interaction in standard ANSI/ISO C++ either. :( C++ is a powerful language, but the standard part of the language has a very limited user interface... This was done to make the "standard part" of the language "portable". (You can compile standard C++ to run on just about any computer.)
I am using Bloodshed Dev C++ v4.0.1 with "conio.h" cut-and-pasted from a different compiler, if that helps. I don't think it has any of the windows-related libraries, but I'm about to buy a book on win32 programming, and that will probably come with a compiler that DOES have them. By the way, in ANSI/ISO C++ you can put a "\a" in your cout statements to make a little beep noise, but thats the only sound i know of.
Yeah, Dev-C++ does do windows. I don't use it though, so I don't know how to configure it.
WARNING - Windows programming is freekin' complicated... Not for beginners. You can take a look at Sunlight's Tutorials if you want to get an introduction.