Displaying a picture in a dialog box

  • Thread starter Thread starter finchie_88
  • Start date Start date
  • Tags Tags
    Box Picture
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
8 replies · 5K views
finchie_88
Hi everyone. I want to display a picture (a jpeg if that make any difference) inside a dialog box, how do I do it?
 
Physics news on Phys.org
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.
 
Last edited by a moderator:
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.
 
Evo said:
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.

<img src="http://xxxxxxxxxxxxxxxxxxxxx.extension" border="0" alt="alt_text_here" />

*cough*

:smile:
 
Last edited by a moderator:
Mattara said:
<img src="http://xxxxxxxxxxxxxxxxxxxxx.extension" border="0" alt="alt_text_here" />

*cough*
:smile:

Yeah, I turn red at the xxx stuff. I can't begin to imagine the material Evo is recommending.
 
Last edited by a moderator:
finchie_88 said:
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.

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.
 
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.
 
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.