]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/ole/activex.cpp
Applied patch [ 1340814 ] fix for wxTextCtrl::GetStyle
[wxWidgets.git] / src / msw / ole / activex.cpp
index 9e418fc892fc0632caa41f4a32eda2021a2382e3..991e7c9870807927bb545978563f8e760a409085 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
 /////////////////////////////////////////////////////////////////////////////
-// Name:        msw/ole/activex.cpp
+// Name:        src/msw/ole/activex.cpp
 // Purpose:     wxActiveXContainer implementation
 // Author:      Ryan Norton <wxprojects@comcast.net>, Lindsay Mathieson <???>
 // Modified by:
 // Purpose:     wxActiveXContainer implementation
 // Author:      Ryan Norton <wxprojects@comcast.net>, Lindsay Mathieson <???>
 // Modified by:
@@ -24,6 +24,7 @@
 #endif
 
 #include "wx/dcclient.h"
 #endif
 
 #include "wx/dcclient.h"
+#include "wx/math.h"
 #include "wx/msw/ole/activex.h"
 
 
 #include "wx/msw/ole/activex.h"
 
 
@@ -206,7 +207,7 @@ public:
             case DISPID_AMBIENT_SILENT:
                 V_BOOL(pVarResult)= TRUE;
                 return S_OK;
             case DISPID_AMBIENT_SILENT:
                 V_BOOL(pVarResult)= TRUE;
                 return S_OK;
-
+#ifndef __WINE__
             case DISPID_AMBIENT_APPEARANCE:
                 pVarResult->vt = VT_BOOL;
                 pVarResult->boolVal = m_bAmbientAppearance;
             case DISPID_AMBIENT_APPEARANCE:
                 pVarResult->vt = VT_BOOL;
                 pVarResult->boolVal = m_bAmbientAppearance;
@@ -241,7 +242,7 @@ public:
                 pVarResult->vt = VT_BOOL;
                 pVarResult->boolVal = m_bAmbientShowHatching;
                 break;
                 pVarResult->vt = VT_BOOL;
                 pVarResult->boolVal = m_bAmbientShowHatching;
                 break;
-
+#endif
             default:
                 return DISP_E_MEMBERNOTFOUND;
         }
             default:
                 return DISP_E_MEMBERNOTFOUND;
         }
@@ -437,7 +438,9 @@ public:
     HRESULT STDMETHODCALLTYPE LockContainer(BOOL){return S_OK;}
     //********************IOleItemContainer***************************
     HRESULT STDMETHODCALLTYPE
     HRESULT STDMETHODCALLTYPE LockContainer(BOOL){return S_OK;}
     //********************IOleItemContainer***************************
     HRESULT STDMETHODCALLTYPE
-    #ifdef _UNICODE
+    #if defined(__WXWINCE__)
+    GetObject
+    #elif defined(_UNICODE)
     GetObjectW
     #else
     GetObjectA
     GetObjectW
     #else
     GetObjectA
@@ -708,7 +711,10 @@ void wxActiveXContainer::CreateActiveX(REFIID iid, IUnknown* pUnk)
         ::SetActiveWindow(m_oleObjectHWND);
         ::ShowWindow(m_oleObjectHWND, SW_SHOW);
 
         ::SetActiveWindow(m_oleObjectHWND);
         ::ShowWindow(m_oleObjectHWND, SW_SHOW);
 
-        this->AssociateHandle(m_oleObjectHWND);
+        {
+            wxLogNull  noLog;
+            this->AssociateHandle(m_oleObjectHWND);
+        }
         this->Reparent(m_realparent);
 
         wxWindow* pWnd = m_realparent;
         this->Reparent(m_realparent);
 
         wxWindow* pWnd = m_realparent;
@@ -741,7 +747,7 @@ static void PixelsToHimetric(SIZEL &sz)
     };
 
 #define HIMETRIC_INCH   2540
     };
 
 #define HIMETRIC_INCH   2540
-#define CONVERT(x, logpixels)   MulDiv(HIMETRIC_INCH, (x), (logpixels))
+#define CONVERT(x, logpixels)   wxMulDivInt32(HIMETRIC_INCH, (x), (logpixels))
 
     sz.cx = CONVERT(sz.cx, logX);
     sz.cy = CONVERT(sz.cy, logY);
 
     sz.cx = CONVERT(sz.cx, logX);
     sz.cy = CONVERT(sz.cy, logY);
@@ -799,7 +805,11 @@ void wxActiveXContainer::OnPaint(wxPaintEvent& WXUNUSED(event))
         posRect.right = w;
         posRect.bottom = h;
 
         posRect.right = w;
         posRect.bottom = h;
 
+#if defined(_WIN32_WCE) && _WIN32_WCE < 400
+        ::InvalidateRect(m_oleObjectHWND, NULL, false);
+#else
         ::RedrawWindow(m_oleObjectHWND, NULL, NULL, RDW_INTERNALPAINT);
         ::RedrawWindow(m_oleObjectHWND, NULL, NULL, RDW_INTERNALPAINT);
+#endif
         RECTL *prcBounds = (RECTL *) &posRect;
         m_viewObject->Draw(DVASPECT_CONTENT, -1, NULL, NULL, NULL,
             (HDC)dc.GetHDC(), prcBounds, NULL, NULL, 0);
         RECTL *prcBounds = (RECTL *) &posRect;
         m_viewObject->Draw(DVASPECT_CONTENT, -1, NULL, NULL, NULL,
             (HDC)dc.GetHDC(), prcBounds, NULL, NULL, 0);