Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: events



>Hi,
    I tried this method and it creates a controller and movie fine, except
that the controller doesn't have a resize button. The movie is resized with
the window's resize button which overlaps the controller. If you were to go
according to the example program, then the solution is to increase the
window size by 16 pixels and position the controller at this height from
the
bottom of the window. This results in white space below the controller to
accommodate the window resize button. Is there any way to get the
controller
to have a resize button like the controller from NewMovieController() does
like in the example
http://developer.apple.com/samplecode/Play_Movie_with_Controller/Play_Movie
_
with_Controller.html
    Also, the controller provided with CreateMovieControl() doesn't seem to
have as many options as the previous one. There seems to be no way to
show/hide the controller once created etc. Or am I missing some
documentation? Thanks<

Hi George,

I am not sure if controlling the movie size with the controller is easy.
You can set a grow box with MCDoAction( mcActionSetGrowBoxBounds ). You
then need to remove the window's grow box and call SizeWindow in your
action filter in response to the mcActionControllerSizeChanged message.
Good luck!

Show/hide the controller works here!
Like so:

static  OSStatus        DoSomething()
{
        /*DebugStr( "\pDoSomething Was Called\n" );*/
        
        OSStatus        error   =       noErr;
        Boolean     visible;
        MovieController mc;

                //      Added field to global g. You can also set a control
ID when creating the movie control.
        error   =       MyGetMovieControllerFromControl( g.movieControl,
&mc );
        
        visible =       MCGetVisible(  mc );
        MCSetVisible(  mc, !visible );
        Draw1Control( g.movieControl ); //      Force update (or use
HIViewSetNeedsDisplay)
        
        return( noErr );
}

OSStatus MyGetMovieControllerFromControl( ControlRef control,
MovieController *mc )
        {
        OSStatus        error   =       noErr;
        Size            actualSize;
        
        error   =       GetControlData( control, kControlEntireControl,
kMovieControlDataMovieController,
                                                                           
                                sizeof( MovieController ), (void *)mc,
&actualSize );
        if ( error )  return error;
                
        
        return  error;
        }

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
QuickTime-API mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quicktime-api/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.