]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/mediactrl.cpp
Warning fix and source cleaning.
[wxWidgets.git] / src / msw / mediactrl.cpp
index 66807c4cbdf1a4c8cdd487b0eb86373add34fbf7..a6c9f7e6102742edc5e62b06359f5410511bacb6 100644 (file)
@@ -43,7 +43,7 @@
 //---------------------------------------------------------------------------
 extern "C" WXDLLIMPEXP_BASE HINSTANCE wxGetInstance(void);
 #ifdef __WXWINCE__
-extern WXDLLIMPEXP_CORE      wxChar *wxCanvasClassName;
+extern WXDLLIMPEXP_CORE       wxChar *wxCanvasClassName;
 #else
 extern WXDLLIMPEXP_CORE const wxChar *wxCanvasClassName;
 #endif
@@ -1014,10 +1014,13 @@ 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,
+    bool bOK = ( mciSendCommand(m_hDev, MCI_PLAY, MCI_NOTIFY,
                             (DWORD)(LPVOID)&playParms) == 0 );
+
+    if(bOK)
+        m_ctrl->Show(m_bVideo);
+
+    return bOK;
 }
 
 //---------------------------------------------------------------------------
@@ -1077,7 +1080,13 @@ bool wxMCIMediaBackend::SetPosition(wxLongLong where)
 {
     MCI_SEEK_PARMS seekParms;
     seekParms.dwCallback = 0;
+#if wxUSE_LONGLONG_NATIVE && !wxUSE_LONGLONG_WX
     seekParms.dwTo = (DWORD)where.GetValue();
+#else /* wxUSE_LONGLONG_WX */
+    /* no way to return it in one piece */
+    wxASSERT( where.GetHi()==0 );
+    seekParms.dwTo = (DWORD)where.GetLo();
+#endif /* wxUSE_LONGLONG_* */
 
     //device was playing?
     bool bReplay = GetState() == wxMEDIASTATE_PLAYING;