Jump to content
  • Advertisement

Archived

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

habus

I need advice with resource files..

This topic is 6922 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! I''m having some headaches with resource files and I hope you can help me. Let me explain the problem: I want to include a midi file in my proyect, so I did a resource file: //heres the code: //Microsoft Developer Studio generated resource script. // #include "resource.h" #define APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 2 resource. // #include "afxres.h" ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // Spanish (Mexican) resources #if !defined(AFX_RESOURCE_DLL) // defined(AFX_TARG_ESM) #ifdef _WIN32 LANGUAGE LANG_SPANISH, SUBLANG_SPANISH_MEXICAN #pragma code_page(1252) #endif //_WIN32 #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // TEXTINCLUDE // 1 TEXTINCLUDE DISCARDABLE BEGIN "resource.h\0" END 2 TEXTINCLUDE DISCARDABLE BEGIN "#include ""afxres.h""\r\n" "\0" END 3 TEXTINCLUDE DISCARDABLE BEGIN "\r\n" "\0" END #endif // APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // MIDI // IDR_MIDI1 MIDI DISCARDABLE "loopfury.mid" #endif // Spanish (Mexican) resources ///////////////////////////////////////////////////////////////////////////// #ifndef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 3 resource. // ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED and the resource.h file created is: //{{NO_DEPENDENCIES}} // Microsoft Developer Studio generated include file. // Used by firstdraw.rc // #define IDR_MIDI1 102 // Next default values for new objects // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 105 #define _APS_NEXT_COMMAND_VALUE 40001 #define _APS_NEXT_CONTROL_VALUE 1000 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif So far my proyect compiles and gets the exe done.. the uh ohs are when I run my exe because this function fails: HRSRC hFound = FindResource(NULL, MAKEINTRESOURCE(IDR_MIDI1), TEXT("MIDI")); Someone has an idea why is all this happening? Any help would be appreciated. Thanks in advance and sorry for the long post.

Share this post


Link to post
Share on other sites
Advertisement

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!