What I am looking for is a Library/Function that will allow me to print a BMP to the screen. Is there a simple way to do this?
-Thanks,
Ranedhel
Printable View
What I am looking for is a Library/Function that will allow me to print a BMP to the screen. Is there a simple way to do this?
-Thanks,
Ranedhel
There is no standard way to do it. If you can and how you do it depends on your platform / compiler. There is Windows API function for Windows, but I can't remember exactly what it is. :(
OpenGL and DirectX (Windows) are commonly used graphics libraries. There are plenty of tutorials available on the web for these, but they are not particularly easy.
You might also want to see the tutorials on this site regarding OpenGL.
If you create a simple application and not a bigger game, it's better for u to use the windows api.
Tutorial about bitmap loading:
http://www.gametutorials.com/Tutoria.../Win32_Pg3.htm
If u wanna program a bigger game, use on e of the following graphics libraries:
OpenGl - www.opengl.org
DirectX - www.microsoft.com (U can mange all the multimedia functionality with DirectX)
SDL - www.libsdl.org
or try to google some information: www.google.com
That's what I feared...
Oh well, thanks for the API info.:)
LoadBitmap() is the older function which loads a bitmap resource and returns a handle. The newer function which does the same thing is LoadImage(), it is more general, but to a beginner, a little harder to use. Once you have a handle to the bitmap, you can copy it into a device context for display with SelectObject().
Don't forget to destroy the object when you are finished with it, use DeletObject() to do this.