Click here to Skip to main content
16,016,263 members
Home / Discussions / COM
   

COM

 
GeneralRe: Registry Pin
ddd_lll_ddd7-Nov-00 13:54
ddd_lll_ddd7-Nov-00 13:54 
GeneralRe: Registry Pin
Michael Dunn7-Nov-00 17:39
sitebuilderMichael Dunn7-Nov-00 17:39 
GeneralRe: Registry Pin
Edward10-Nov-00 12:55
Edward10-Nov-00 12:55 
GeneralImplementing ActiveX EXE in a Web Page Pin
KrustY5-Nov-00 19:42
KrustY5-Nov-00 19:42 
GeneralRe: Implementing ActiveX EXE in a Web Page Pin
Alex Gorev6-Nov-00 4:15
Alex Gorev6-Nov-00 4:15 
GeneralCan't fire events to IE Pin
Luis Teixeira30-Oct-00 1:49
Luis Teixeira30-Oct-00 1:49 
Generalclient detection Pin
P e t e r27-Oct-00 0:28
P e t e r27-Oct-00 0:28 
QuestionHow to : Hook IE document message... Pin
Soohyun Bae26-Oct-00 20:14
sussSoohyun Bae26-Oct-00 20:14 
Hi.

I'm Soohyun Bae.

Now I'd like to hook some messages invoked by IE document, for example, mousemove, mouse click, key down...

Now, I could receive these messages by connecting my class derived from IDispatch to IE document.


CImpDispatch* m_pEvents;
m_pEvents = new CImpDispatch((IOleInPlaceFrame *)this);

hr = pCPC->FindConnectionPoint( DIID_HTMLDocumentEvents, &m_pConnectionPoint );

hr = m_pConnectionPoint->Advise(m_pEvents, m_dwConnectCookie );

...

and CImpDispatch...

STDMETHODIMP CImpIDispatch::Invoke(
DISPID dispIdMember, REFIID riid,
LCID lcid, WORD wFlags,
DISPPARAMS* pDispParams, VARIANT* pVarResult,
EXCEPINFO* pExcepInfo, UINT* puArgErr)
{
IHTMLEventObj *pEvtObj = NULL;
long x;
HRESULT hr;
if (dispIdMember == DISPID_HTMLDOCUMENTEVENTS_ONKEYDOWN )
{
hr = m_pWindow->get_event(&pEvtObj);
if (hr == S_OK)
{
pEvtObj->get_keyCode(&x);
// A key hook
if (x==65)
{
Trace("_HOOK: A key pressed");
x=0; // Point 1
hr = pEvtObj->put_keyCode(x); // Point 2
if (hr==S_OK)
{
pEvtObj->get_keyCode(&x);
}
}
}
}
return S_OK;
}


I could take reference code in www.microsoft.com/Mind/1297/hookIE.htm (really good...)

-----------------------------------------------------------


My Point is :

I hope to prevent resending specified message to IE.
I have thought that two points 1 and 2 could make so. But, ... couldn't...

How can I prevent resending ?

Generalclient crash Pin
P e t e r25-Oct-00 23:37
P e t e r25-Oct-00 23:37 
Generaltlbinf32.dll Pin
Andy Huang25-Oct-00 11:38
Andy Huang25-Oct-00 11:38 
GeneralRe: tlbinf32.dll Pin
JoeBloggs25-Oct-00 17:14
JoeBloggs25-Oct-00 17:14 
GeneralDCOM server Pin
Roger25-Oct-00 9:41
Roger25-Oct-00 9:41 
GeneralRe: DCOM server Pin
26-Jan-01 1:56
suss26-Jan-01 1:56 
GeneralUI Pin
koteswara25-Oct-00 1:55
koteswara25-Oct-00 1:55 
GeneralPassing Object Pointers In COM Pin
Adrian Metcalfe25-Oct-00 1:23
Adrian Metcalfe25-Oct-00 1:23 
GeneralRe: Passing Object Pointers In COM Pin
Peter Zajac26-Oct-00 3:52
Peter Zajac26-Oct-00 3:52 
GeneralRe: Passing Object Pointers In COM Pin
Adrian Metcalfe26-Oct-00 4:18
Adrian Metcalfe26-Oct-00 4:18 
GeneralRe: Passing Object Pointers In COM Pin
22-Jul-01 6:03
suss22-Jul-01 6:03 
GeneralRe: Passing Object Pointers In COM Pin
Peter Zajac26-Oct-00 3:59
Peter Zajac26-Oct-00 3:59 
GeneralRe: Passing Object Pointers In COM Pin
Adrian Metcalfe26-Oct-00 4:19
Adrian Metcalfe26-Oct-00 4:19 
GeneralRe: Passing Object Pointers In COM Pin
Michael Dunn26-Oct-00 19:33
sitebuilderMichael Dunn26-Oct-00 19:33 
GeneralRe: Passing Object Pointers In COM Pin
Todd Smith22-Jul-01 7:05
Todd Smith22-Jul-01 7:05 
GeneralRe: Passing Object Pointers In COM Pin
Adrian Metcalfe23-Jul-01 0:09
Adrian Metcalfe23-Jul-01 0:09 
GeneralRe: Passing Object Pointers In COM Pin
Todd Smith23-Jul-01 8:47
Todd Smith23-Jul-01 8:47 
GeneralRe: Passing Object Pointers In COM Pin
Todd Smith23-Jul-01 8:48
Todd Smith23-Jul-01 8:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.