From e163773d412f8dd640c3b6d5b5cca018d4a974db Mon Sep 17 00:00:00 2001 From: Ryan Norton Date: Wed, 24 Nov 2004 21:21:13 +0000 Subject: [PATCH] reduce black background flicker a bit - there is still some left sometimes initially (MCI backend) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30769 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/mediactrl.cpp | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/src/msw/mediactrl.cpp b/src/msw/mediactrl.cpp index 97092f8e99..66807c4cbd 100644 --- a/src/msw/mediactrl.cpp +++ b/src/msw/mediactrl.cpp @@ -336,7 +336,7 @@ wxAMMediaBackend::~wxAMMediaBackend() // wxAMMediaBackend::CreateControl // // ActiveMovie does not really have any native control to speak of, -// so we just create a normal control with a black background. +// so we just create a normal control. // // We also check to see if ActiveMovie is installed //--------------------------------------------------------------------------- @@ -372,11 +372,6 @@ bool wxAMMediaBackend::CreateControl(wxControl* ctrl, wxWindow* parent, validator, name) ) return false; - // - //Set our background color to black by default - // - ctrl->SetBackgroundColour(*wxBLACK); - m_ctrl = ctrl; return true; } @@ -886,11 +881,6 @@ bool wxMCIMediaBackend::CreateControl(wxControl* ctrl, wxWindow* parent, validator, name) ) return false; - // - //Set our background color to black by default - // - ctrl->SetBackgroundColour(*wxBLACK); - m_ctrl = ctrl; return true; } @@ -982,6 +972,8 @@ bool wxMCIMediaBackend::Load(const wxString& fileName) ::SetWindowLong(m_hNotifyWnd, GWL_USERDATA, (LONG) this); + m_ctrl->Show(false); + // //Here, if the parent of the control has a sizer - we //tell it to recalculate the size of this control since @@ -1022,6 +1014,8 @@ bool wxMCIMediaBackend::Play() MCI_PLAY_PARMS playParms; playParms.dwCallback = (DWORD)m_hNotifyWnd; + m_ctrl->Show(m_bVideo); + return ( mciSendCommand(m_hDev, MCI_PLAY, MCI_NOTIFY, (DWORD)(LPVOID)&playParms) == 0 ); } @@ -1388,11 +1382,6 @@ bool wxQTMediaBackend::CreateControl(wxControl* ctrl, wxWindow* parent, validator, name) ) return false; - // - //Set our background color to black by default - // - ctrl->SetBackgroundColour(*wxBLACK); - m_ctrl = ctrl; return true; } @@ -1618,9 +1607,10 @@ bool wxQTMediaBackend::SetPosition(wxLongLong where) } //--------------------------------------------------------------------------- -// wxQTMediaBackend::Move +// wxQTMediaBackend::GetPosition // -// TODO +// 1) Calls GetMovieTime to get the position we are in in the movie +// in milliseconds (we called //--------------------------------------------------------------------------- wxLongLong wxQTMediaBackend::GetPosition() { -- 2.47.2