Thread: Displaying a bmp - How to do it

  1. #1
    Registered User
    Join Date
    May 2003

    Displaying a bmp - How to do it

    Yes, I know it's in the FAQ but I have a question about it. This is my final year in high school and we were just introduced to C so I'm really just exploring its limits.

    I want to display a BMP in my program. We have only made programs that a simple little 'Command Prompt' window comes up and prints just text. We're using Microsoft Visual Studio 6.0 (if it makes a difference).

    But is it possible to do with the window that our output is shown in?

  2. #2
    Registered User
    Join Date
    May 2003
    You need to do window programming.
    If you dont know anything about it, create a new project and make sure you choose to create a window project and not console one.
    Most of the time, the compiler will initialize the default window code for you if you are using a window based compiler like MS V or DevC++.
    If you have it, you might as well see the main function in the code.
    Just add the code as usual in the main function. It should do the simple task of creating the window with the text or something printed in it.
    for more advanced options, learn window programming. It is just a serie of codes and functions you need to know.

  3. #3
    Registered User GoodStuff's Avatar
    Join Date
    Jan 2003
    It's simple.

    If you understand Pascal, you can search the net for the PCGPE - PC Game Programmers Encyclopedia. They have one file in the archive that deals with displaying bmp's and pcx's. The browser they include is a bit old though, so just read the txt files.

    Hope this helps,

    "I honour they who seek to grok C"

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem reading BMP
    By Mortissus in forum C Programming
    Replies: 4
    Last Post: 02-02-2006, 06:32 AM
  2. Strange problem with bmp
    By Victor in forum Linux Programming
    Replies: 2
    Last Post: 04-04-2005, 02:48 PM
  3. Displaying BMP file
    By nmalik in forum C Programming
    Replies: 2
    Last Post: 04-01-2002, 09:27 PM
  4. Displaying BMP in DJGPP (Win32 Console)
    By CBGMan in forum C++ Programming
    Replies: 1
    Last Post: 11-03-2001, 01:59 PM