Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Getting MCDraw to draw the controller?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting MCDraw to draw the controller?



At 12:31 PM -0800 2/28/02, Bryce Wolfson wrote:
>MCDraw takes a WindowRef as one of its parameters. If the movie's port
>matches the WindowRef, the movie gets drawn. If the controller's port
>matches the WindowRef, the controller gets drawn.
>
>If they're in the same port, one call should draw both, whether the
>controller is attached or not.

That's what I thought too, but that's not actually the case. To keep things simple, the MovieController is attached and both the Movie and the MovieController are set to the same port. Despite this, MCDraw will draw the movie but not the controller-bar.

Since MCDraw isn't doing anything useful, the answer seems to be just to forget about it. The best suggestion for getting the entire MovieController to redraw itself is to call MCInvalidate followed by MCIdle. It seems like a bit of a hack, but it does work reliably.

>OS X introduces a fun* new concept where a window and port no longer are the
>same thing. Since those two things _were_ the same thing right up until OS
>X, QT uses a window in some API calls and a port in others, and which gets
>used where no longer always makes sense in the context of OS X.

Yes, I discovered this the hard way when I first started doing OS X development. For seventeen years I had happily been assuming that WindowPtrs and GrafPtrs were interchangeable, and suddenly they weren't. It was quite a traumatic discovery at the time.

Thanks,

Eric Smith
Tarkvara Design Inc.
_______________________________________________
quicktime-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/quicktime-api
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Getting MCDraw to draw the controller? (From: Bryce Wolfson <email@hidden>)



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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.