]> git.saurik.com Git - wxWidgets.git/commitdiff
Applied [ 1202378 ] Fix display of MSW mediactrl when not using sizers et al.
authorJulian Smart <julian@anthemion.co.uk>
Sun, 22 May 2005 11:02:22 +0000 (11:02 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Sun, 22 May 2005 11:02:22 +0000 (11:02 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34238 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/mediactrl.cpp

index b047783ab542f7da9e05d210581d9aae0c31d7b8..b8fd0d369d6fd8686e8f92828fcd4d4b430bbe97 100644 (file)
@@ -1323,6 +1323,7 @@ bool wxAMMediaBackend::Load(const wxString& fileName)
     m_ctrl->GetParent()->Layout();
     m_ctrl->GetParent()->Refresh();
     m_ctrl->GetParent()->Update();
     m_ctrl->GetParent()->Layout();
     m_ctrl->GetParent()->Refresh();
     m_ctrl->GetParent()->Update();
+    m_ctrl->SetSize(m_ctrl->GetSize()); 
 
     return true;
 }
 
     return true;
 }
@@ -1856,6 +1857,7 @@ bool wxMCIMediaBackend::Load(const wxString& fileName)
     m_ctrl->GetParent()->Layout();
     m_ctrl->GetParent()->Refresh();
     m_ctrl->GetParent()->Update();
     m_ctrl->GetParent()->Layout();
     m_ctrl->GetParent()->Refresh();
     m_ctrl->GetParent()->Update();
+    m_ctrl->SetSize(m_ctrl->GetSize()); 
 
     return true;
 }
 
     return true;
 }
@@ -2063,14 +2065,19 @@ void wxMCIMediaBackend::Move(int WXUNUSED(x), int WXUNUSED(y),
     if (m_hNotifyWnd && m_bVideo)
     {
         MCI_DGV_RECT_PARMS putParms; //ifdefed MCI_DGV_PUT_PARMS
     if (m_hNotifyWnd && m_bVideo)
     {
         MCI_DGV_RECT_PARMS putParms; //ifdefed MCI_DGV_PUT_PARMS
-        putParms.rc.top = 0;
-        putParms.rc.bottom = 0;
-        putParms.rc.right = w;
+        memset(&putParms, 0, sizeof(MCI_DGV_RECT_PARMS)); 
         putParms.rc.bottom = h;
         putParms.rc.bottom = h;
-
-        wxMCIVERIFY( mciSendCommand(m_hDev, MCI_PUT,
+        putParms.rc.right = w; 
+
+        //wxStackWalker will crash and burn here on assert 
+        //and mci doesn't like 0 and 0 for some reason (out of range ) 
+        //so just don't it in that case 
+        if(w || h) 
+        { 
+            wxMCIVERIFY( mciSendCommand(m_hDev, MCI_PUT,
                                    0x00040000L, //MCI_DGV_PUT_DESTINATION
                                    (DWORD)(LPSTR)&putParms) );
                                    0x00040000L, //MCI_DGV_PUT_DESTINATION
                                    (DWORD)(LPSTR)&putParms) );
+        }
     }
 }
 
     }
 }