Hi,
i was wondering how to display an image to screen using c++. Which would be the best way to go about doing this, any help would be great.
Thanks.
Hi,
i was wondering how to display an image to screen using c++. Which would be the best way to go about doing this, any help would be great.
Thanks.
In times of war, shoot!
There isn't a "standard library" way to do that. You will have to either use system specific functions (e.g. Windows API calls) or use a third party library [wxWidgets comes to mind, but I'm no expert at that].
So we would need to know if you are using Windows or some form of Unix (or some other OS perhaps). Which compiler you are using would also be useful.
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
Thanks,
I will be using Windows XP, i like to use Visual C++ Express to do my development. So i guess looking at the Windows API is probably a good place to start.
In times of war, shoot!
Ok, so you will first of all need to create a simple window. On top of that, you will have to load the bitmap (using for example LoadImage()), and then use a BitBlt() function to draw the image to the window.
If you haven't got a book that describes how to do Windows programming, I would suggest that you get one - Charles Petzold (I think that's the correct spelling) have good reputation when it comes for writing books on Windows programming. There are dozens of other good authors too.
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
Thanks for your help.
Much appreciated .
In times of war, shoot!
Greets,
I would like to "Open/display/write transparent .png win32 api"
in "C" Source. Is there maybe a snippet for this?
Thanks a gig...vmars316
Do not bother with WinAPI.
You cannot just "display it". You will need to have a form processing events, etc. You can use wxWidgets (it is free), but if you are targetting Windows you can use MFC (I am not expert at Visual Studio).