In article <4TqJf.47164$T35.776032@[EMAIL PROTECTED]
>,
"blah" <blah@[EMAIL PROTECTED]
> wrote:
> I am trying to develop a Mac application that will run on OS X and OS 9.
I
> am using CodeWarrior 9 running on OS X.
>
> Here's my question:
> How can I display a QuickTime movie on a dialog?
>
> Some sample code would help. I did find a class in PowerPlant that may
help
> called LMovieController but I am unsure how to use it.
1.) Write a C++ PowerPlant program that shows a dialog. Test it.
2.) In Constructor, add a LView to your dialog, give it a unique paneID.
Test it.
You will need to add UQuickTime.cp to your project if it isn't already
there. You may need to add the QuickTime library to your project if it
isn't already there.
Get a Movie. You'll probably need to write some code here. Look at
UQuickTime::GetMovieFromFile() for examples.
Make a new LMovieController programmaticly with
LMovieController *moviePane = new LMovieController(paneinfo, myMovie);
where paneinfo is an appropriately filled out SPaneInfo struct. Get the
superView by calling FindPaneByID() on the dialog's LWindow with the
paneID form step 2.
You can't just add a LMovieController to your dialog in Constructor,
because LMovieController doesn't have any public member functions for
setting which movie it will play. You could subclass LMovieController to
add such a function, but then you'd have to pretty much copy the code
out of the constructor I used above. So, it seemed simplest just to
construct an instance at runtime.
Note that according to Apple's published do***entation,
DisposeMovieController() does not dispose the underlying Movie, so
you'll need to save another reference to the Move so that you can do a
DisposeMovie() when you are done with it. I believe that it is wise to
DisposeMovieController first (which the desctructor of LMovieController
does for you), then call DisposeMovie.


|