|
-
Sep 16th, 2001, 12:54 PM
#1
Fanatic Member
Anything that's not one of the predefined types like bitmap etc will be picked up by the editor as a custom one, which is why I have "SOUND" as the type for the sound file. What you call it doesn't matter, but people generally make a descriptive type for it. You just have to make sure that when you pull the file out later that you use the same type you added it in under. For any type that follows under custom like this, you get them out with LoadResData(), and it will return a byte array. So for MIDI files, I'd probably call them "MIDI" when putting them in, then pull them out with that and put them into a byte array. I don't know of a way to play MIDI files from memory like you can with wav files, so you'll have to extract the file into a byte array first, then write it to a temp file, then play that. I believe MCI may have the capability of playing some other audio files from a memory buffer but I'm not positive on that. If you have a text file you're trying to save/load prog info from, you'd probably be better off using the registry if you need security, or an INI file if not (they're easier to work with). You can't change the things inside a resource file from the prog that uses the data from the resource file in the first place, so if you save your text/HTML files in the resource file, you'll have to write them to the hard drive if you want to change them later.
I'm baaaack...
VB5 Professional Edition, VC++ 6
Using a 1 gHz Thunderbird, 256 mb RAM, 40 gb HD system with Win98se
I feel special because I finally figured out how to loop midis: Post link
I'm a fanatic too 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|