Re: Knowing when a frame/IWebBrowser2 is destroyed?
From: Igor Tandetnik (itandetnik_at_mvps.org)
Date: 03/18/04
- Next message: George Ionescu: "Re: Silent IE SAVEAS"
- Previous message: Igor Tandetnik: "Re: Print Preview with custom headers/footers"
- In reply to: Roger Shrubber: "Re: Knowing when a frame/IWebBrowser2 is destroyed?"
- Next in thread: Roger Shrubber: "Re: Knowing when a frame/IWebBrowser2 is destroyed?"
- Reply: Roger Shrubber: "Re: Knowing when a frame/IWebBrowser2 is destroyed?"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 18 Mar 2004 10:47:24 -0500
"Roger Shrubber" <roger128shrubber@hotmail.com> wrote in message
news:82fbf7c.0403172021.757a3007@posting.google.com
> I've now succeeded in making this work by creating a data structure
> that mirrors the relationships between frames, and updating it
> regularly in CHtmlView::BeforeNavigate2(). The hardest bit was
> finding the parent IWebBrowser2 given the IWebBrowser2 of a frame.
How come? IWebBrowser2::get_Parent gives you the parent Document object.
Query it for IServiceProvider and call QueryService(SID_SWebBrowserApp)
to get an enclosing IWebBrowser2.
> Is there a reason why you chose NavigateComplete2()?
BeforeNavigate2 fires for URLs like vbscript: and javascript: that don't
actually cause navigation and thus don't destroy frames. Also, the user
can hit Stop button at any time. If she does so between BeforeNavigate2
and NavigateComplete2, the original page stays untouched, frames and
all. But if she hits Stop after NavigateComplete2, she gets a blank page
or Navigation Aborted error page, depending on the settings. Either way,
the frames are gone.
--
With best wishes,
Igor Tandetnik
"For every complex problem, there is a solution that is simple, neat,
and wrong." H.L. Mencken
- Next message: George Ionescu: "Re: Silent IE SAVEAS"
- Previous message: Igor Tandetnik: "Re: Print Preview with custom headers/footers"
- In reply to: Roger Shrubber: "Re: Knowing when a frame/IWebBrowser2 is destroyed?"
- Next in thread: Roger Shrubber: "Re: Knowing when a frame/IWebBrowser2 is destroyed?"
- Reply: Roger Shrubber: "Re: Knowing when a frame/IWebBrowser2 is destroyed?"
- Messages sorted by: [ date ] [ thread ]