+ //reparent movie/*AudioMediaCharacteristic*/
+ if(GetMovieIndTrackType(m_movie, 1,
+ VisualMediaCharacteristic,
+ movieTrackCharacteristic |
+ movieTrackEnabledOnly) != NULL)
+ {
+#if wxUSE_CREATEMOVIECONTROL
+ //
+ //Native CreateMovieControl QT control (Thanks to Kevin Olliver's
+ //wxQTMovie for some of this).
+ //
+ #define GetControlPeer(whatever) ctrl->m_peer
+ wxMediaCtrl* ctrl = (wxMediaCtrl*) m_ctrl;
+ Rect bounds = wxMacGetBoundsForControl(m_ctrl,
+ m_ctrl->GetPosition(),
+ m_ctrl->GetSize());
+
+ //Dispose of old control for new one
+ if (GetControlPeer(m_ctrl) && GetControlPeer(m_ctrl)->Ok() )
+ GetControlPeer(m_ctrl)->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)
+ ctrl->MacGetTopLevelWindowRef(), //parent
+ &bounds, //control bounds
+ m_movie, //movie handle
+ kMovieControlOptionHideController
+ | kMovieControlOptionLocateTopLeft
+ | kMovieControlOptionSetKeysEnabled
+// | kMovieControlOptionManuallyIdled
+ , //flags
+ ctrl->m_peer->GetControlRefAddr() );
+
+ ::EmbedControl(ctrl->m_peer->GetControlRef(), (ControlRef)ctrl->GetParent()->GetHandle());