I can't capture KEYDOWN message in COM running in IE, how to do?
Printable View
I can't capture KEYDOWN message in COM running in IE, how to do?
Is it an ActiveX control or a windowless control ?
It's an ActiveX Control
If it is an ATL activeX
You need to put in the message map macro
and the handler function, if it is MFC it is straighforward through the ClassWizard
BEGIN_MSG_MAP(CYourControlClass)
CHAIN_MSG_MAP CComControl<CYourControlClass>)
MESSAGE_HANDLER(WM_LBUTTONDOWN, OnLButtonDown)
DEFAULT_REFLECTION_HANDLER()
END_MSG_MAP()
// Handler prototypes:
// LRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
/
put the implementation as above. You may need to handle WM_CHAR just as above if you mean KEYDOWN.
I suspect think this is not the answer to ur problem since this is rather trivial ! however ..