Article View: borland.public.cppbuilder.internet.web
Article #478Re: CppWebBrowser OnNewWindow2 event handling
From: Hans Galema
Date: Mon, 08 Jan 2007 12:20
Date: Mon, 08 Jan 2007 12:20
25 lines
2102 bytes
2102 bytes
Mark Jacobs wrote: > ...I want to control the app launching > the URL. That is why I need the URL. I have seen a solution that invovles > letting the instance start, but grab the URL and cancel the navigation > inside the OnBeforeNavigate event, but I don't like that solution. Is there > any way of getting the intended URL from the LPDISPATCH parameter? At the moment I don't know. What I found was a thread with Subject: Getting Target in NewWindow2 <quote> Another approach I've tried is capturing DWebBrowserEvent::NewWindow instead. Since that handler, unlike NewWindow2, gets the target, as well as the URL, I could just do cancel the request and create the window myself. But that breaks the window relations within the scripting engine, so it was a less than satisfactory solution. </quote> Now NewWindow is not public. But maybe you can make a class that makes it public. By the way: You are not generating the html yourself I suppose. Hans.
Technical Details
Message-ID:
<45a23770$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!colt.net!feeder.news-service.com!194.25.134.62.MISMATCH!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<45a16d9f$1@newsgroups.borland.com> <45a176de$1@newsgroups.borland.com> <45a178db@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: feeec,3b7f79a773c6cfb8 X-Google-Attributes: gidfeeec,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Mon, 08 Jan 2007 13:20:29 +0100 From: Hans Galema <notused@notused.nl> User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.internet.web Subject: Re: CppWebBrowser OnNewWindow2 event handling References: <45a16d9f$1@newsgroups.borland.com> <45a176de$1@newsgroups.borland.com> <45a178db@newsgroups.borland.com> In-Reply-To: <45a178db@newsgroups.borland.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 145.98.201.248 Message-ID: <45a23770$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1168258928 145.98.201.248 (8 Jan 2007 04:22:08 -0800) Lines: 25 Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!colt.net!feeder.news-service.com!194.25.134.62.MISMATCH!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail