+ //
+ //Native CreateMovieControl QT control (Thanks to Kevin Olliver's
+ //wxQTMovie for some of this).
+ //
+ Rect bounds = wxMacGetBoundsForControl(m_ctrl,
+ m_ctrl->GetPosition(),
+ m_ctrl->GetSize());
+
+ //Dispose of old control for new one
+ if (m_ctrl->m_peer && m_ctrl->m_peer->Ok() )
+ m_ctrl->m_peer->Dispose();
+
+ //Options-
+ //kMovieControlOptionXXX
+ //HideController - hide the movie controller
+ //LocateTopLeft - movie is pinned to top left rather than centered in the control
+ //EnableEditing - Allows programmatic editing and dragn'drop
+ //HandleEditingHI- Installs event stuff for edit menu - forces EnableEditing also
+ //SetKeysEnabled - Allows keyboard input
+ //ManuallyIdled - app handles movie idling rather than internal timer event loop
+ ::CreateMovieControl(
+ (WindowRef)
+ m_ctrl->MacGetTopLevelWindowRef(), //parent
+ &bounds, //control bounds
+ m_movie, //movie handle
+ kMovieControlOptionHideController
+ | kMovieControlOptionLocateTopLeft
+ | kMovieControlOptionSetKeysEnabled
+ // | kMovieControlOptionManuallyIdled
+ , //flags
+ m_ctrl->m_peer->GetControlRefAddr() );
+
+ ::EmbedControl(m_ctrl->m_peer->GetControlRef(),
+ (ControlRef)m_ctrl->GetParent()->GetHandle());
+
+ //
+ // Setup MovieController for the new movie
+ //
+ long dataSize;
+
+ //Get movie controller from our control
+ ::GetControlData( m_ctrl->m_peer->GetControlRef(), 0,
+ kMovieControlDataMovieController,
+ sizeof(MovieController), (Ptr)&m_mc, &dataSize );
+
+ // Setup a callback so we can tell when the user presses
+ // play on the player controls
+ ::MCSetActionFilterWithRefCon(m_mc,
+ wxQTMediaBackend::MCFilterProc, (long)this);
+}
+#endif