How to use bitmaps?

I have been trying to figure this out the last couple days, and nothing on the internet seems to make much sense. So, I am turning to my last resort: a forum.

Anyway, my question is simple: How to display a bitmap on a program, and how to have multiple bitmaps. Also, is there a way to use a .png for a picture in a window? I don't feel like converting all my sprites to .bmp. Thanks for any help!
Use a graphics lib, like SDL. I never used it before but it seems popular.

If you want to stick with windows functions I can't recommend using GDI or GDI+ as they're both old and slow. That leaves OpenGL, DirectX, and Direct2D.

Personally I've grown to really enjoy Direct2D. Combined with Windows Imaging Component you can load and render any type of image, and with hardware acceleration. Both have a bit of a learning curve though, especially if you're not comfortable using COM-based API's.

I believe Windows 7 & 8 use Direct2D + DirectWrite to render the UI.

Look up Direct2D and Windows Imaging Component on MSDN. There should be an overview, user guide, and example code for each. I'd be glad to help more if you decide to go this route.
Last edited on
I am gonna go with Direct2D, I guess. Luckily I already had the headers in VS, I don't know how, but I do. Thanks for the advice!
closed account (z05DSL3A)
AceDawg45 wrote:
I am gonna go with Direct2D, I guess.


Take a look at this then:

Hilo: Developing C++ Applications for Windows 7
http://msdn.microsoft.com/en-us/library/windows/desktop/ff708696.aspx
Thanks! I will use that after I am done reading through this on msdn:
http://msdn.microsoft.com/en-us/library/windows/desktop/dd370994(v=vs.85).aspx
Topic archived. No new replies allowed.