Fix crash on wxMediaCtrl creation in wxMSW.
A valid RECT pointer must be passed to DoVerb(OLEIVERB_INPLACEACTIVATE) but r72027 (see #14209) broke this and passed it NULL resulting in an instant crash. Revert this part of the change and do pass out window client area. Closes #14682. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72534 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
7cc3d0e004
commit
6e34a9e443
@ -1113,8 +1113,11 @@ void wxActiveXContainer::CreateActiveX(REFIID iid, IUnknown* pUnk)
|
||||
|
||||
if (! (dwMiscStatus & OLEMISC_INVISIBLEATRUNTIME))
|
||||
{
|
||||
RECT posRect;
|
||||
wxCopyRectToRECT(m_realparent->GetClientSize(), posRect);
|
||||
|
||||
hret = m_oleObject->DoVerb(OLEIVERB_INPLACEACTIVATE, NULL,
|
||||
m_clientSite, 0, (HWND)m_realparent->GetHWND(), NULL);
|
||||
m_clientSite, 0, (HWND)m_realparent->GetHWND(), &posRect);
|
||||
CHECK_HR(hret);
|
||||
|
||||
if (m_oleInPlaceObject.IsOk())
|
||||
@ -1124,9 +1127,6 @@ void wxActiveXContainer::CreateActiveX(REFIID iid, IUnknown* pUnk)
|
||||
::SetActiveWindow(m_oleObjectHWND);
|
||||
}
|
||||
|
||||
RECT posRect;
|
||||
wxCopyRectToRECT(m_realparent->GetClientSize(), posRect);
|
||||
|
||||
if (posRect.right > 0 && posRect.bottom > 0 &&
|
||||
m_oleInPlaceObject.IsOk())
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user