From: Julian Smart Date: Sun, 22 May 2005 11:02:22 +0000 (+0000) Subject: Applied [ 1202378 ] Fix display of MSW mediactrl when not using sizers et al. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/7c4a4505c1adadac4ed11d68445a9da2b028e49b Applied [ 1202378 ] Fix display of MSW mediactrl when not using sizers et al. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34238 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/mediactrl.cpp b/src/msw/mediactrl.cpp index b047783ab5..b8fd0d369d 100644 --- a/src/msw/mediactrl.cpp +++ b/src/msw/mediactrl.cpp @@ -1323,6 +1323,7 @@ bool wxAMMediaBackend::Load(const wxString& fileName) m_ctrl->GetParent()->Layout(); m_ctrl->GetParent()->Refresh(); m_ctrl->GetParent()->Update(); + m_ctrl->SetSize(m_ctrl->GetSize()); 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->SetSize(m_ctrl->GetSize()); 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 - putParms.rc.top = 0; - putParms.rc.bottom = 0; - putParms.rc.right = w; + memset(&putParms, 0, sizeof(MCI_DGV_RECT_PARMS)); 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) ); + } } }