I have an ActiveX control written in C++ that I created with VS2008 and ATL. For the most part, it is a pretty standard (not modified much from the original template) control, except that instead of using IDispatchImpl, I have created my own IDispatchEx implementation. This control is only used in Internet Explorer, and I have been testing primarily with IE8.
Everything works great, except that for some reason, InPlaceActivate doesn't get called until I move the mouse over the region where the object tag is hosted in the browser; no window is created, no WM_CREATE message sent, etc.
I have tried implementing DISPID_READYSTATE, but nothing seems to help. If I call InPlaceActivate(OLEIVERB_UIACTIVATE);
from the SetClientSite
method and it usually works, but that certainly isn't normally neccesary.
Why would this happen? How does the browser determine when to call InPlaceActivate (or whatever call triggers that)?
The tag used to embed the ATL control into the page is:
<object id="plugin" type="application/x-vnd.FirebreathTemplatePlugin" width="300" height="300"></object>
You full source to the file can be found here: http://code.google.com/p/firebreath/source/browse/src/ActiveXPlugin/FBControl.h