Trying to load a wave file into a class from the resource's
-
I have come across a program that displays a jpg image, which can be opened in the usual manner. However I noticed at start up it displays a default image loaded from memory(resoucres). The statement m_pict.Load(IDR_MAINFRAME); I thought that this sort of method could work well,in effect with a program that plays sounds (waveBox - from the articles), I have looked in the resources and it allows you to load 'wave' files into it. can anybody explain maybe why this is not working. I have also tried including the resource.h is there any oversite in my part many thanks Simon
-
I have come across a program that displays a jpg image, which can be opened in the usual manner. However I noticed at start up it displays a default image loaded from memory(resoucres). The statement m_pict.Load(IDR_MAINFRAME); I thought that this sort of method could work well,in effect with a program that plays sounds (waveBox - from the articles), I have looked in the resources and it allows you to load 'wave' files into it. can anybody explain maybe why this is not working. I have also tried including the resource.h is there any oversite in my part many thanks Simon
simon alec smith wrote:
can anybody explain maybe why this is not working.
Why what isn't working? You can load any file type from resources - this page[^] describes the process reasonably well under the 'Creating a Resource List' heading:
- call FindResource or FindResourceEx with the resource name to get the resource handle;
- call LoadResource with the resource handle to get the global handle;
- call LockResource with the global handle to get a pointer to the resource data.
I've done this several times - it works really well.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p