]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/contrib/activex/wxie/wxactivex.cpp
wx.ProgressDialog.Update now returns two values.
[wxWidgets.git] / wxPython / contrib / activex / wxie / wxactivex.cpp
index bef4563dc9df2cc0f083bd1b53f042eb78721c37..77d372d9937b86158cd923b12834926c681bf28a 100644 (file)
@@ -1170,9 +1170,35 @@ void wxActiveX::GetTypeInfo(ITypeInfo *ti, bool defInterface, bool defEventSink)
             ConnectAdvise(ta->guid, disp);
         };
 
             ConnectAdvise(ta->guid, disp);
         };
 
+        // Get properties
+        // See bug #1280715 in the wxActiveX SF project
+        int i;
+        for (i = 0; i < ta->cVars; i++) {
+            VARDESC FAR *vd = NULL;
+
+            typeInfo->GetVarDesc(i, &vd) ;
+            BSTR bstrProperty = NULL;
+            typeInfo->GetDocumentation(vd->memid, &bstrProperty,
+                                       NULL, NULL, NULL);
+            wxString propName(bstrProperty);
+            m_props.push_back(PropX());
+            int idx = m_props.size() - 1;
+            m_propNames[propName] = idx;
+            m_props[idx].name = propName;
+            m_props[idx].memid = vd->memid;
+
+            ParamX param;
+            param.isSafeArray = false;
+            param.isPtr = false;
+            param.flags = vd->elemdescVar.idldesc.wIDLFlags;
+            param.vt = vd->elemdescVar.tdesc.vt;
+
+            m_props[idx].arg = param;
+            m_props[idx].type = param;
+        }        
 
         // Get Function Names
 
         // Get Function Names
-        for (int i = 0; i < ta->cFuncs; i++)
+        for (i = 0; i < ta->cFuncs; i++)
         {
             FUNCDESC FAR *fd = NULL;
 
         {
             FUNCDESC FAR *fd = NULL;
 
@@ -1680,7 +1706,6 @@ void wxActiveX::OnPaint(wxPaintEvent& event)
 {
     wxLogTrace(wxT(""),wxT("repainting activex win"));
     wxPaintDC dc(this);
 {
     wxLogTrace(wxT(""),wxT("repainting activex win"));
     wxPaintDC dc(this);
-    dc.BeginDrawing();
     int w, h;
     GetSize(&w, &h);
     RECT posRect;
     int w, h;
     GetSize(&w, &h);
     RECT posRect;
@@ -1705,7 +1730,6 @@ void wxActiveX::OnPaint(wxPaintEvent& event)
         dc.DrawRectangle(0, 0, w, h);
         dc.SetBrush(wxNullBrush);
     }
         dc.DrawRectangle(0, 0, w, h);
         dc.SetBrush(wxNullBrush);
     }
-    dc.EndDrawing();
 }
 
 
 }