Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
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?
0 · ·