Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

sparksfly

So close yet so far....

This topic is 5542 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi Just got into dx programming. Using borland dx sdk 8.0 and compiling with BC++ builder 4.0 pro. Using lib files provided by Michael Fötsch. Want to try and compile and run SDK example for SwitchScreenMode. Everything compiles ok - don''t even get warnings. (Took me AGES to get this far :-/) Sadly, when it runs I get "InitDirectDraw fails". I tracked the problem down to this function: g_pDisplay->CreatePaletteFromBitmap( &pDDPal, MAKEINTRESOURCE( IDB_DIRECTX ) ) ) I think i know why its not running but i dont know what to do about it. Basically, IDB_DIRECTX refers to the directx.bmp graphic which is stored in a resource file: SwitchScreenMode.rc. I''ve added this file to my project. *NOW*, its looking for a header file: afxres.h This file is not in the dx sdk, in the common headers or shipped with borland c++ builder. What action should I take? NOTE: switching to VC++ is NOT a solution for me. Thanks for all help in advance.

Share this post


Link to post
Share on other sites
Advertisement
afxres.h is created by the Visual C++ resource tools and contains, among other things, defines for resource IDs - like IDB_DIRECTX. The afxres.h file should be included with the other source code for the SwitchScreenMode sample.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!