m_oleObjectHWND = 0;
- if (m_oleInPlaceObject.IsOk())
- {
- hret = m_oleInPlaceObject->GetWindow(&m_oleObjectHWND);
- if (SUCCEEDED(hret))
- ::SetActiveWindow(m_oleObjectHWND);
- }
-
if (! (dwMiscStatus & OLEMISC_INVISIBLEATRUNTIME))
{
+ hret = m_oleObject->DoVerb(OLEIVERB_INPLACEACTIVATE, NULL,
+ m_clientSite, 0, (HWND)m_realparent->GetHWND(), NULL);
+ CHECK_HR(hret);
+
+ if (m_oleInPlaceObject.IsOk())
+ {
+ hret = m_oleInPlaceObject->GetWindow(&m_oleObjectHWND);
+ CHECK_HR(hret);
+ ::SetActiveWindow(m_oleObjectHWND);
+ }
+
RECT posRect;
wxCopyRectToRECT(m_realparent->GetClientSize(), posRect);
m_oleInPlaceObject->SetObjectRects(&posRect, &posRect);
}
- hret = m_oleObject->DoVerb(OLEIVERB_INPLACEACTIVATE, NULL,
- m_clientSite, 0, (HWND)m_realparent->GetHWND(), &posRect);
- CHECK_HR(hret);
-
hret = m_oleObject->DoVerb(OLEIVERB_SHOW, 0, m_clientSite, 0,
(HWND)m_realparent->GetHWND(), &posRect);
CHECK_HR(hret);