Re: separate BHO for a frame
- From: "Igor Tandetnik" <itandetnik@xxxxxxxx>
- Date: Mon, 19 Dec 2005 08:14:08 -0500
"Noa" <Noa@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:AD6F6237-42FA-4121-8493-DA0875453CBB@xxxxxxxxxxxxx
> Is there a way to get the events of a specific frame or iframe (and
> its contained frames..)
Sure. Each frame is a separate WebBrowser object represented by its own
IWebBrowser2 pointer, and you can sink events from each one
individually. Most of the time you don't need to though - most
WebBrowser events bubble up and get fired by the top-level browser
object, with an IDispatch pointer telling you which frame the event
really came from.
> in a separate instance of BHO and not in the
> instance of the top level window?
No, not in a separate instance. There will be only one BHO instance per
top-level browser. Of course, nothing says there must be exactly one
event sink per BHO instance. You can make event sink a separate object,
have BHO create as many of them as you need and attach to whatever
frames you want.
> What i'm actually trying to achieve is getting the events of a frame
> without them being mixed with the events of a sibling frame.
In my experience, it is easier to just handle all events at the top
level, and simply ignore those events you are not interested in.
--
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925
.
- Follow-Ups:
- Re: separate BHO for a frame
- From: Noa
- Re: separate BHO for a frame
- Prev by Date: Re: ActiveX "microsoft webbrowser control" and BHO
- Next by Date: Re: ActiveX "microsoft webbrowser control" and BHO
- Previous by thread: Re: ActiveX "microsoft webbrowser control" and BHO
- Next by thread: Re: separate BHO for a frame
- Index(es):
Relevant Pages
|