Play Resource AVI in MediaPlayer
Posted on 2004-04-26
I've got a form, onto which I have placed a MediaPlayer object. I have created an RC file and compiled this into a RES file. This RES file now holds an AVI file that I want to play with the MediaPlayer.
I've seen some solutions to this that involve saving the file so that you can open it directly from disk, or other solutions that can play a resource file as if using the windows "OPEN" command (opening the AVI in a seperate window - the associated AVI player), and neither of these solutions are any good to me.
I've been a Delphi programmer for many years now and am quite suprised by how difficult this task seems to be - surely I'm mistaken!
If I were to perform this task in Delphi, I would simply use the ResID or ResName property of the MediaPlayer (TAnimate, in the case of Delphi), and everything else is automatically done.
How can I play a compiled AVI resource, with a MediaPlayer on the form?
Example code would be appreciated.