Re: Manipulating frame names of CHtmlView windows.
From: Igor Tandetnik (itandetnik_at_mvps.org)
Date: 09/22/04
- Next message: Nate Taylor: "Internet Explorer Object and Alerts (or other dialog boxes)"
- Previous message: Paavo Helde: "Manipulating frame names of CHtmlView windows."
- In reply to: Paavo Helde: "Manipulating frame names of CHtmlView windows."
- Next in thread: Paavo Helde: "Re: Manipulating frame names of CHtmlView windows."
- Reply: Paavo Helde: "Re: Manipulating frame names of CHtmlView windows."
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 22 Sep 2004 10:00:55 -0400
"Paavo Helde" <paavo@ebi.ee> wrote in message
news:a5df4b39.0409220447.c9ae7d7@posting.google.com
> I have a MFC app with several view windows derived from CHtmlView, of
> several different C++ classes. I would like to have some of them be
> named frame targets, so that the <a href=... frame=somename> would be
> correctly redirected to the appropriate view. The targeting topics
> have been discussed several times in this ng, but I have yet to find a
> proper solution.
That would be <a href=... target=somename>
I suspect the "right" solution is to implement ITargetFrame, which has a
promising-looking FindFrame method. This interface is virtually
undocumented, I have no idea when and how the browser uses it and how to
properly implement it. All I know is that WebBrowser control queries for
it repeatedly, using IServiceProvider::QueryService off the client site
pointer.
Be aware that if you actually assign the names to your browser instances
(IHTMLWindow2::put_name) and let them register themselves with the
system (RegisterAsBrowser = true), then targets will automatically find
them. Such a registration is system-wide though, so if for example there
are two instances of your app running, it is possible that links clicked
in one instance would navigate browsers in the other.
> However, the final obstacle is that the view type is not correct! In
> OnNewWindow2() I don't know which class' object I have to create, and
> the object dynamic type cannot be changed later, at least not by legal
> means.
I don't understand what you are talking about here. You always create
WebBrowser object in response to NewWindow2. Am I missing something?
--
With best wishes,
Igor Tandetnik
"On two occasions, I have been asked [by members of Parliament], 'Pray,
Mr. Babbage, if you put into the machine wrong figures, will the right
answers come out?' I am not able to rightly apprehend the kind of
confusion of ideas that could provoke such a question." -- Charles
Babbage
- Next message: Nate Taylor: "Internet Explorer Object and Alerts (or other dialog boxes)"
- Previous message: Paavo Helde: "Manipulating frame names of CHtmlView windows."
- In reply to: Paavo Helde: "Manipulating frame names of CHtmlView windows."
- Next in thread: Paavo Helde: "Re: Manipulating frame names of CHtmlView windows."
- Reply: Paavo Helde: "Re: Manipulating frame names of CHtmlView windows."
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|