]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/ole/activex.cpp
avoid flicker when setting the text which is the same as the current status bar pane...
[wxWidgets.git] / src / msw / ole / activex.cpp
index a689f525dd30c5b8c23d1a2ef64d938bce89fa72..e54ffabb78e8d3300de4750dcc89c26989196fa9 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:
     #pragma hdrstop
 #endif
 
-#include "wx/dcclient.h"
-#include "wx/math.h"
+#if wxUSE_ACTIVEX
 
-// I don't know why members of tagVARIANT aren't found when compiling
-// with Wine
-#ifndef __WINE__
+#ifndef WX_PRECOMP
+    #include "wx/dcclient.h"
+    #include "wx/math.h"
+#endif
 
 #include "wx/msw/ole/activex.h"
 // autointerfaces that we only use here
@@ -523,7 +523,7 @@ public:
     HRESULT STDMETHODCALLTYPE LockContainer(BOOL){return S_OK;}
     //********************IOleItemContainer***************************
     HRESULT STDMETHODCALLTYPE
-    #if defined(__WXWINCE__) && __VISUALC__ < 1400
+    #if 0 // defined(__WXWINCE__) && __VISUALC__ < 1400
     GetObject
     #elif defined(_UNICODE)
     GetObjectW
@@ -894,7 +894,6 @@ void wxActiveXContainer::CreateActiveX(REFIID iid, IUnknown* pUnk)
             continue;
 
         // check if default event sink
-        bool defInterface = false;
         bool defEventSink = false;
         int impTypeFlags = 0;
         typeInfo->GetImplTypeFlags(i, &impTypeFlags);
@@ -912,11 +911,6 @@ void wxActiveXContainer::CreateActiveX(REFIID iid, IUnknown* pUnk)
                     wxFAIL_MSG(wxT("Default event sink is in vtable!"));
                 }
             }
-            else
-            {
-                // WXOLE_TRACEOUT("Default Interface");
-                defInterface = true;
-            }
         }
 
 
@@ -946,7 +940,7 @@ void wxActiveXContainer::CreateActiveX(REFIID iid, IUnknown* pUnk)
                 hret = cp->Advise(new wxActiveXEvents(this, ta->guid),
                                   &adviseCookie);
                 wxASSERT_MSG( SUCCEEDED(hret),
-                    wxString::Format(wxT("Cannot connect!\nHRESULT:%X"), hret)
+                    wxString::Format(wxT("Cannot connect!\nHRESULT:%X"), (unsigned int)hret)
                             );
             }
         }
@@ -1123,7 +1117,11 @@ void wxActiveXContainer::OnPaint(wxPaintEvent& WXUNUSED(event))
         posRect.right = w;
         posRect.bottom = h;
 
+#if !(defined(_WIN32_WCE) && _WIN32_WCE < 400)
         ::RedrawWindow(m_oleObjectHWND, NULL, NULL, RDW_INTERNALPAINT);
+#else
+        ::InvalidateRect(m_oleObjectHWND, NULL, false);
+#endif
         RECTL *prcBounds = (RECTL *) &posRect;
         m_viewObject->Draw(DVASPECT_CONTENT, -1, NULL, NULL, NULL,
             (HDC)dc.GetHDC(), prcBounds, NULL, NULL, 0);
@@ -1157,5 +1155,4 @@ void wxActiveXContainer::OnKillFocus(wxFocusEvent& event)
     event.Skip();
 }
 
-#endif
-// __WINE__
+#endif // wxUSE_ACTIVEX