[wx-dev] #9606: wxActiveX event processing displays error messages when it should not

wxTrac noreply at wxsite.net
Fri Jun 20 02:21:51 PDT 2008


Ticket URL: <http://trac.wxwidgets.org/ticket/9606>

#9606: wxActiveX event processing displays error messages when it should not
----------------------------------+-----------------------------------------
 Reporter:  hajokirchhoff         |       Owner:         
     Type:  enhancement           |      Status:  new    
 Priority:  normal                |   Milestone:         
Component:  wxMSW                 |     Version:  2.9-svn
 Keywords:  activex events error  |   Blockedby:         
    Patch:  1                     |    Blocking:         
----------------------------------+-----------------------------------------
 Presently error messages appear for events sent by an ActiveX control if
 the event has parameters that are not understood by wxConvertOleToVariant.

 This happens even if the event is not handled by the wxWidgets
 application.

 That makes wxActiveXContainer unusable for ActiveX controls such as
 Crystal Reports. These controls send complex events (VT_VECTOR|VT_BYREF)
 which can safely be ignored, but at present they print an error message
 for every such event.

 Worse, if a user installs a software update and the new version of that
 ActiveX control introduces new events, then existing wxWidgets application
 will suddenly start displaying error messages. Imagine Microsoft would
 update some media player ActiveX components. This would break all
 wxWidgets applications using wxMediaCtrl, even though the new events could
 simply be ignored.

 wxActiveXEvents::Invoke gets called when a 3rd party active X control
 sends an event.
 Invoke uses wxConvertOleToVariant to convert any event VARIANT parameters
 to wxVariant.
 If this event has VARIANT arguments that wxConvertOleToVariant does not
 understand, wxConvertOleToVariant will complain with a wxLogError.

 This patch wraps the call to wxConvertOleToVariant with a wxLogNull to
 suppress this error.


 {{{

 }}}


--
Ticket URL: <http://trac.wxwidgets.org/ticket/9606>


More information about the wx-dev mailing list