# how to make C++ display images



## ste2425 (Feb 26, 2010)

hi

im making a little program and i need it to display images.
Ive googled it and come up with loads of different librarys that allow you to create graphics for games etc but there isnt much in their tutorials on how to load up an image file and then display it onto the screen. Could anyone help me out with this?

many thanks ste


----------



## W1zzard (Feb 26, 2010)

under which os are you coding? anything like mfc you are using ?


----------



## ste2425 (Feb 26, 2010)

W1zzard said:


> under which os are you coding? anything like mfc you are using ?



im running windows vista 64bit, and i dont understand what you mean MFC? sorry im fairly new at coding.
thanks


----------



## [I.R.A]_FBi (Feb 26, 2010)

microsoft foundation class


----------



## W1zzard (Feb 26, 2010)

are you using borland c++ or visual studio? or something else?


----------



## ste2425 (Feb 27, 2010)

W1zzard said:


> are you using borland c++ or visual studio? or something else?



Sorry i didnt realise this info would be important, im using visual studio, with something called HALL V3. Its what we were given when i started my uni course not too long ago to do the programming section. It contains all different .h files the the lectures have made for us to do different audio and middi edditing. 
I dont think im using any MFC, or atleast realise im using one?


----------



## W1zzard (Feb 27, 2010)

how do you create your application windows ?


----------



## ste2425 (Feb 27, 2010)

errr if i understand your right i click on the hall exe it loads up visual studio then i just include iostream and the 





> using namespace std;


 thing then start making my program


----------



## W1zzard (Feb 27, 2010)

so you have a console only application? that does not create any new windows but sits in a "dos box" ? how do you plan on displaying images in that?


----------



## ste2425 (Feb 27, 2010)

W1zzard said:


> so you have a console only application? that does not create any new windows but sits in a "dos box" ? how do you plan on displaying images in that?



yea thats the one errrm to be onest i dont actually no, i recently did a lecture making bitmap images but that is a huge pain i would be allot easier if i could make display one already created, i just asummed that if i could create bitmaps then it would be able to display premade ones. I gues i was wrong?

edit:


----------



## PVTCaboose1337 (Feb 27, 2010)

What you are trying to do IS possible, just not with the standard cmd.exe console.  Sadly it seems you might need to use DX.  Here is a good start for you:  http://www.directxtutorial.com/Tutorial9/A-Win32/dx9A.aspx


----------



## ste2425 (Feb 27, 2010)

PVTCaboose1337 said:


> What you are trying to do IS possible, just not with the standard cmd.exe console.  Sadly it seems you might need to use DX.  Here is a good start for you:  http://www.directxtutorial.com/Tutorial9/A-Win32/dx9A.aspx



thanks ill have a look, basicly what im trying to do is make a small program that i input a musical key like c# then it'l show me a image of the key and the notes in it, write out the notes in it and play them. I can do everything other then make it display the image. Sorry maybe i should have said this at the beginning, thanks for the help everyone

edit: well ive done it




using a library called the CLmg Library
http://cimg.sourceforge.net/index.shtml
if anyone else needs to do the same thing all info is on that page 

thanks for all the help with this guys


----------

