Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Displaying a picture in a dialog box

  1. Jul 15, 2006 #1
    Hi everyone. I want to display a picture (a jpeg if that make any difference) inside a dialog box, how do I do it?
     
  2. jcsd
  3. Jul 15, 2006 #2

    0rthodontist

    User Avatar
    Science Advisor

    What's the context--is this a website? What programming language?
     
  4. Jul 15, 2006 #3

    Evo

    User Avatar

    Staff: Mentor

    Is it an online journal? It would depend on what has been disabled. You can try <img src="http://xxxxxxxxxxxxxxxxxxxxx"border=0> to upload a picture that is hosted on a website.
     
  5. Jul 16, 2006 #4
    Sorry about the lack of information. I'm writing in C++, and want to make a tetris game. It's going ok, I just wanted to add a few pictures that's all.
     
  6. Jul 16, 2006 #5
    <img src="http://xxxxxxxxxxxxxxxxxxxxx.extension" border="0" alt="alt_text_here" />

    *cough*

    :rofl:
     
  7. Jul 17, 2006 #6

    GENIERE

    User Avatar
    Science Advisor

    Yeah, I turn red at the xxx stuff. I can't begin to imagine the material Evo is recommending.
     
  8. Jul 17, 2006 #7

    jtbell

    User Avatar

    Staff: Mentor

    The C++ language does not have standard functions for graphics. You have to use libraries that depend on which operating system you're using (MacOS? Unix/Linux? Or, er, uh, um, that thing Bill Gates sells? :wink: ), and possibly on which compiler or programming environment you're using.
     
  9. Jul 17, 2006 #8
    ok, sorry, for the delay in replying. Anyway, the OS is windows, the IDE that I am using is Dev-C++ (and am using the default compiler provided with the download). I will be using the functions that are provided in the windows header file(s). I hope someone can help.
     
  10. Jul 17, 2006 #9
    If you are just starting with windows programming, then using the Win32 API (i.e. the functions provided with the windows header files) might be a tad too difficult. You could do a quick google search on LibSDL or even Allegro as they will simplify your programming by a great deal.

    If you do need to use the windows API, I suggest you go to the MSDN website and do a quick search on Bitmaps and Device Contexts. Also a good site to visit is: http://www.winprog.org/tutorial/ and follow the tutorials they have there.

    Hope it helps.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Displaying a picture in a dialog box
  1. Picture Algorithem (Replies: 1)

  2. Display image in java (Replies: 18)

Loading...