I have an ActiveX control, derived from a button. (MFC, not ATL).

When viewed in IE, it works just fine (all it does it automate an Excel spreadsheet when they click on the button).

But in a CHtmlView (which is what I designed it for) applicaition it works but the user has to click the button TWICE for it to fire off.

The OnOcmCommand(...) function is where I do the automation. I don't check the command message, I just assume it's a click (as I said, it works fine in IE).

Any thoughts?