Simple VC++ DHTML Hooking Technique

Environment: VC6 SP4, ie5, ie5-lib
This example demonstrates how to access DHTML object model and how to intercept the DHTML element events, it also demonstrates how to use connectionpoint with MFC. The demo program first loads up a sample html page containing two button elements and a listbox element. Then it accesses a button element DHTML object and intercepts its Click, DoubleClick, MouseMove, MouseOver, MouseDown, MouseUp events. After the program intercepts an event, it records the event information to a ListBox element on sample html page. The example is showing that MSHTML is very useful for internet and web programming. I hope this example provides some help for any one who want to use MSHTML library. (You need to download ie5_lib or a later IE library to compile the demo project)
Comments
Problem setting connection point on Input Image type elements.
Posted by kamleshsoni1979 on 11/25/2004 09:49amGreat implementation of event sink!
Posted by piotrmb on 06/14/2004 06:37amSimple, yet functional implementation of event sink! Great job.
Replyhow can i get the click event on IHTMLInputButtonElement
Posted by Legacy on 08/28/2003 12:00amOriginally posted by: east zhang
ok
Posted by journeyMFC on 10/17/2008 11:03amvery good!
ReplyClicking formatted links: how can I get anchor value?
Posted by Legacy on 07/22/2003 12:00amOriginally posted by: Vladimir Kamsky
Situation: <A HREF=url><B>Some link</B></A>
I'd like to intercept anchor clicking.
ReplyWhen clicking at this link I've got "clicking bold text" (most internal). How can I get outer <A HREF=url>?
MSHTMLHOOK in netscape also?
Posted by Legacy on 06/22/2003 12:00amOriginally posted by: Jayaprabha
Can MSHTMLHOOK be used to access the document of netscape also?
Replywhy don't work "VTS_DISPATCH" option in "DISP_FUNCTION_ID" macro
Posted by Legacy on 04/17/2003 12:00amOriginally posted by: Jin4309
hi~ i'm a beginning Programmer....download this sample ago 3 weeks....
but, can't compile....i readed yours reply Message, and find measures....that say modify code can compile....that is right...
But....Modify Code have a big trouble....DISP_FUNCTION_ID macro option(6th) is VTS_NONE....it is no argument function's option....but i need EventObj...
but change VTS_NONE to VTS_DISPATCH(or other opton) function haven't Run Time
Why? plz help me....
Don't work
Posted by Legacy on 03/12/2003 12:00amOriginally posted by: hongwei
use ie6,it can work
Posted by xqyz8888 on 04/12/2004 01:36ami do not know the reason
ReplyOK but capture mouse click for all the web page ?
Posted by Legacy on 01/31/2003 12:00amOriginally posted by: jeremyS
with this example i understand to capture mouse click on buttons, but i want detect mouse click down et mouse click up for all web page.
Replywhen someone selct text in the html document i want to know the mouse position when clisk down and the position when click up !
you know how to do this??
Can you embed a contol in an HTML page that can do this?
Posted by Legacy on 12/05/2002 12:00amOriginally posted by: Joseph Mueller
What does the mshtmlhook.odl do?
Posted by Legacy on 10/22/2002 12:00amOriginally posted by: nodman
Hello everyone, I just downloaded the hook example and found it is pretty good! I have it modified and merge it into my project, much thanks to author!
I found there is a "mshtmlhook.odl" file in the example. I dont know what it is, I removed it from project and it works properly anyway, what I want to know about is what can this ODL file do? Will I meet some trouble in the future without the ODL file?
ReplyLoading, Please Wait ...