Displaying graphics in C++.

This is a discussion on Displaying graphics in C++. within the C++ Programming forums, part of the General Programming Boards category; What I am looking for is a Library/Function that will allow me to print a BMP to the screen. Is ...

  1. #1
    Registered User Ranedhel's Avatar
    Join Date
    Jun 2003
    Posts
    34

    Displaying graphics in C++.

    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
    -Elven Forge Software-
    (Lead Designer)

    http://www.geocities.com/elvenforge

    **infected by frenchfry164**
    I am a signature virus. Please add me to your signature so that I may multiply

  2. #2
    Hardware Engineer
    Join Date
    Sep 2001
    Posts
    1,398
    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.

  3. #3
    Toaster Zach L.'s Avatar
    Join Date
    Aug 2001
    Posts
    2,686
    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.
    The word rap as it applies to music is the result of a peculiar phonological rule which has stripped the word of its initial voiceless velar stop.

  4. #4
    Registered User codingmaster's Avatar
    Join Date
    Sep 2002
    Posts
    309
    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

  5. #5
    Registered User Ranedhel's Avatar
    Join Date
    Jun 2003
    Posts
    34

    Re:

    That's what I feared...
    Oh well, thanks for the API info.
    -Elven Forge Software-
    (Lead Designer)

    http://www.geocities.com/elvenforge

    **infected by frenchfry164**
    I am a signature virus. Please add me to your signature so that I may multiply

  6. #6
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    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.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Beginning Game Programming Type Books
    By bumfluff in forum Game Programming
    Replies: 36
    Last Post: 09-13-2006, 04:15 PM
  2. Displaying an int in graphics mode?
    By wakish in forum C Programming
    Replies: 4
    Last Post: 07-09-2006, 10:35 AM
  3. Graphics Programming :: Approach and Books
    By kuphryn in forum Windows Programming
    Replies: 4
    Last Post: 05-11-2004, 08:33 PM
  4. egavga.bgi problem
    By sunil21 in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 09-22-2003, 05:06 PM
  5. Graphics Devices and Cprintf clash
    By etnies in forum C Programming
    Replies: 6
    Last Post: 05-09-2002, 11:14 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21