September 16th, 1999, 09:12 PM
I am trying to use LoadResource and FindResource to load a music (WAV) file in MFC and I need to get a copy of the Instance is there a function that returns the Instance of the program
or is there another way to play wav files in MFC weather by accepting the file name or playing it from the resources
lucky bob
September 16th, 1999, 09:44 PM
I don't know about digging the instance out of MFC, but have you tried the PlaySound function? It's pretty easy. Just feed it a wavefile, set some flags, and off she runs. (I don't have all the params off the top of my head, but check the Help). To the best of my knowledge, it's compatible w/ MFC, too.
L. B.
Thomas Ascher
September 17th, 1999, 02:07 AM
hi, you need a module handle for LoadResource or FindResource not a instance handle. you can get the module handle of a .exe or .dll with the function GetModuleHandle. but if you want to load the resource from the current .exe or .dll you can pass NULL as module handle to LoadResource or FindResource. these functions then use the current module to load the resources.