ATL control IE event handler not called when event is fired

Locked ATL control IE event handler not called when event is fired

  • sexta-feira, 9 de março de 2012 16:08
     
     
    I have ATL project that contains 4 activex controls.  This controls were meant to target IE 8 with scripting.  I first developed and tested them VS 2008 and a VB6 form as a container.  All the event handlers are called properly in VB6.  When using IE 8 as a container the event handlers do not get called.  I chose to let VS 2008 link the events to event handler on the hTML page by selecting the object in the objects dropdown and then selecting the event in the events drop down.  In previous version of IE this worked.  In IE 7 I could even do late event binding after creating the object at run time.  In this HTML  app the objects are early bound on the HTML page.  What do need to do to troubleshoot this issue?

    Kenney

Todas as Respostas

  • sexta-feira, 9 de março de 2012 20:40
     
     
    Did you remember to implement IProvideClassInfo2?
  • segunda-feira, 12 de março de 2012 12:58
     
     
    Yes, IProvideClassInfo2 is implemented through IProvideClassInfo2Impl.

    Kenney

  • quarta-feira, 14 de março de 2012 14:52
     
     
    I think part of my problem is activiation.  I have the OLEMISC_ACTIVATEWHENVISIBLE enumeration value defined for my control.  I create a test control that was visible on the page and set a event to fire when is was activated.  Only when I clicked on the control was a secondary event I attached to the mouse click message fired.  In reading support docs from microsoft activex controls should now activate without user interaction I know this was not always the case but microsoft ponied up some money for licensing and changed the way controls and containers interacted.  What am I missing?

    Kenney