From: Ryan Norton Date: Mon, 8 Nov 2004 02:05:01 +0000 (+0000) Subject: finalize MSW implementation X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/2bff0db15b533355529c3bde3ff50ac7002ed625 finalize MSW implementation git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30355 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/moviectrl.cpp b/src/msw/moviectrl.cpp index 3b9c85c663..eae679d4a4 100644 --- a/src/msw/moviectrl.cpp +++ b/src/msw/moviectrl.cpp @@ -107,7 +107,11 @@ bool wxMovieCtrl::Load(const wxString& fileName) //get the _actual_ size of the movie & remember it long nX, nY, nSX, nSY; if (FAILED(pVW->GetWindowPosition(&nX,&nY,&nSX,&nSY))) + { m_bVideo = false; + + nSX = nSY = 0; + } else { m_bVideo = true; @@ -124,7 +128,7 @@ bool wxMovieCtrl::Load(const wxString& fileName) { wxDSVERIFY( pVW->put_Owner((OAHWND)this->GetHandle()) ); wxDSVERIFY( pVW->put_WindowStyle(WS_CHILD | WS_CLIPSIBLINGS) ); - // wxDSVERIFY( pME->SetNotifyWindow((OAHWND)this->GetHandle(), WM_GRAPHNOTIFY, 0) ); + wxDSVERIFY( pME->SetNotifyWindow((OAHWND)this->GetHandle(), WM_GRAPHNOTIFY, 0) ); wxDSVERIFY( pVW->put_Visible(OATRUE) ); //OATRUE actually == -1 :) } @@ -173,7 +177,7 @@ bool wxMovieCtrl::Stop() bool wxMovieCtrl::Seek(const wxTimeSpan& where) { //DS uses 100 nanos - so we need a 10 mult - LONGLONG pos = ((size_t)where.GetMilliseconds().ToLong()) * 10; + LONGLONG pos = (where.GetMilliseconds() * ((wxLongLong)10000)).GetValue(); return SUCCEEDED( ((IMediaSeeking*&)m_pMS)->SetPositions( &pos, @@ -188,7 +192,8 @@ wxTimeSpan wxMovieCtrl::Tell() LONGLONG outCur, outStop; wxDSVERIFY( ((IMediaSeeking*&)m_pMS)->GetPositions(&outCur, &outStop) ); - return outCur; + //h,m,s,milli - outdur is in 100 nanos + return wxTimeSpan(0,0,0,outCur/10000); } wxTimeSpan wxMovieCtrl::Length() @@ -196,7 +201,8 @@ wxTimeSpan wxMovieCtrl::Length() LONGLONG outDuration; wxDSVERIFY( ((IMediaSeeking*&)m_pMS)->GetDuration(&outDuration) ); - return outDuration; + //h,m,s,milli - outdur is in 100 nanos + return wxTimeSpan(0,0, 0,outDuration/10000); } #endif // wxUSE_DATETIME