]> git.saurik.com Git - wxWidgets.git/commitdiff
use wxWindow::GetClientSize() instead of ::GetClientRect() in wxActiveXContainer...
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 13 Jan 2009 22:53:49 +0000 (22:53 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 13 Jan 2009 22:53:49 +0000 (22:53 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58086 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/ole/activex.cpp

index eb05f85bb68f61495927f485ab34a74fd5868b13..58a4c2bf68770bd1028347ccc2bea7cb996c9656 100644 (file)
@@ -1017,9 +1017,6 @@ void wxActiveXContainer::CreateActiveX(REFIID iid, IUnknown* pUnk)
         m_oleObject->SetClientSite(m_clientSite);
 
 
-    RECT posRect;
-    ::GetClientRect((HWND)m_realparent->GetHWND(), &posRect);
-
     m_oleObjectHWND = 0;
 
     if (m_oleInPlaceObject.Ok())
@@ -1032,9 +1029,14 @@ void wxActiveXContainer::CreateActiveX(REFIID iid, IUnknown* pUnk)
 
     if (! (dwMiscStatus & OLEMISC_INVISIBLEATRUNTIME))
     {
+        RECT posRect;
+        wxCopyRectToRECT(m_realparent->GetClientSize(), posRect);
+
         if (posRect.right > 0 && posRect.bottom > 0 &&
             m_oleInPlaceObject.Ok())
-                m_oleInPlaceObject->SetObjectRects(&posRect, &posRect);
+        {
+            m_oleInPlaceObject->SetObjectRects(&posRect, &posRect);
+        }
 
         hret = m_oleObject->DoVerb(OLEIVERB_INPLACEACTIVATE, NULL,
             m_clientSite, 0, (HWND)m_realparent->GetHWND(), &posRect);