Direct Draw - DDLoadBitmap - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Direct Draw - DDLoadBitmap

In ddutil.h theres a function called DDLoadBitmap which creates a surface and loadsa a bitmap onto it. I can use this function fine if i use bitmap files not resources but when i try to use it using bitmap resources it doesn't work.

I'm using MS Visual C++ 6 and i add the bitmap files to my project then i make a resource script and add the bitmap files to that, then i tried each of the following to load the bitmap onto a direct draw surface but none of them worked.

dds_s_main = DDLoadBitmap(m_dd7, MAKEINTRESOURCE(IDB_S_MAIN), 0, 0);
dds_s_main = DDLoadBitmap(m_dd7, "IDB_S_MAIN", 0, 0);
dds_s_main = DDLoadBitmap(m_dd7, "rwmain.bmp", 0, 0);
dds_s_main = DDLoadBitmap(m_dd7, "rwmain", 0, 0);
dds_s_main = DDLoadBitmap(m_dd7, IDB_S_MAIN, 0, 0);

Anyone have any ideas what i'm doing wrong?

Thanks :)
Sign In or Register to comment.