Article View: borland.public.cppbuilder.internet.web
Article #730Re: Assigning eventhandlers to TWebControl
From: Eric Jensen
Date: Wed, 01 Nov 2006 18:18
Date: Wed, 01 Nov 2006 18:18
46 lines
2523 bytes
2523 bytes
I'm having a very similar problem, but with BCB 2006. I'm upgrading a project from BCB 5, and am getting the following error: [C++ Error] MyFile.cpp(38): E2034 Cannot convert 'void (_fastcall * (_closure )(TObject *,IDispatch *,Variant *))(TObject *,IDispatch *,Variant *)' to 'TCppWebBrowserDocumentComplete' with this function definition: void __fastcall navigateToOddsPageComplete(TObject *Sender, LPDISPATCH pDisp, Variant *URL); on this line: browser->OnDocumentComplete = navigateToOddsPageComplete; One other thing.. I changed all my 'TVariant's to 'Variant' during the conversion. I also noticed that the error says IDispatch * instead of LPDISPATCH, and I tried to replace it, but with no luck. (Also, the automatically generated functions by BCB use LPDISPATCH). Hopefully some can help with Hans' and my problem. Thanks, Toby "Hans Galema" <notused@notused.nl> wrote in message news:45486e95@newsgroups.borland.com... > In bcb5 I could assign an eventhandler (created with the IDE) to > TCppWebBrowser like: > > CppWebBrowser1->OnDocumentComplete = CppWebBrowser1DocumentComplete; > > Now with Turbo C++ I have to use TWebBrowser and tried the same: > > WebBrowser1->OnDocumentComplete = WebBrowser1DocumentComplete; > > This is giving me following compiler error: > [C++ Error] UploadFlvFrame1.cpp(1045): E2034 Cannot convert > 'void (_fastcall * (_closure )(TObject *,const IDispatch *,OleVariant &)) > (TObject *,const IDispatch *,OleVariant &)' > to 'TWebBrowserDocumentComplete' > > I do not understand this typedef so who can shed a light? > > Hans.
Technical Details
Message-ID:
<4548e428@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<45486e95@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: feeec,8607198c852a630 X-Google-Attributes: gidfeeec,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Eric Jensen" <eric@warplabs.com> Newsgroups: borland.public.cppbuilder.internet.web References: <45486e95@newsgroups.borland.com> Subject: Re: Assigning eventhandlers to TWebControl Date: Wed, 1 Nov 2006 11:18:09 -0700 Lines: 48 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2869 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 NNTP-Posting-Host: 68.145.110.49 Message-ID: <4548e428@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1162404904 68.145.110.49 (1 Nov 2006 10:15:04 -0700) Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail