Article View: borland.public.cppbuilder.internet.web
Article #1454Re: How to capture events on a TCppWebBrowser...
From: Hans Galema
Date: Thu, 16 Dec 2004 09:16
Date: Thu, 16 Dec 2004 09:16
26 lines
1965 bytes
1965 bytes
Nesbel Fra wrote:
> In my project I need to create TCppWebBrowsers components at runtime, I use:
> TCppWebBrowser* aBrowser = new TCppWebBrowser(pnlWeb);
> Somebody know how can I capture events on each "aBrowser" component??
You can use all eventhandlers that otherwise are created and
assigned by the objectinspector in the ide.
You can once let create an eventhandler by the ide and then assign
it to the property of your at runtime instanciated component.
For instance: The ide can create: the CppWebBrowser1DocumentComplete
eventhandler which you then give your code:
void __fastcall TForm1::CppWebBrowser1DocumentComplete(TObject *Sender,
LPDISPATCH pDisp, TVariant *URL)
{
Showmessage ( "CppWebBrowser1DocumentComplete" );
}
Now assign it to your component aBrowser:
aBrowser->OnDocumentComplete = CppWebBrowser1DocumentComplete;
Hans.
Technical Details
Message-ID:
<41c15299$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!transit.nntp.hccnet.nl!transit1.nntp.hccnet.nl!border2.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<41c004b6@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: feeec,e1f82dc4cb951cf8 X-Google-Attributes: gidfeeec,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Thu, 16 Dec 2004 10:16:45 +0100 From: Hans Galema <notused@notused.nl> User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.internet.web Subject: Re: How to capture events on a TCppWebBrowser... References: <41c004b6@newsgroups.borland.com> In-Reply-To: <41c004b6@newsgroups.borland.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 129.125.201.248 Message-ID: <41c15299$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1103188633 129.125.201.248 (16 Dec 2004 01:17:13 -0800) Lines: 26 Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!transit.nntp.hccnet.nl!transit1.nntp.hccnet.nl!border2.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail