Article View: borland.public.cppbuilder.internet.web
Article #1342Re: Show Find dialog in TCppWebBrowser
From: Mark Finkle
Date: Wed, 23 Feb 2005 08:02
Date: Wed, 23 Feb 2005 08:02
64 lines
3057 bytes
3057 bytes
A couple things:
1. Use IOleCommandTarget->Exec(...)
QueryInterface your IHTMLDocument2 for it.
2. Create a GUID using the value found on the web page you found. This is
the command group and is used as a namespace for the command ids. The
OLECMDXxx and IDM_Xxx command ids are for different namespaces (sometimes).
In this case you want the WebBrowser namespace.
3. Use the constant from the web page you found. The original author used
HTMLID_FIND = 1, do the same.
4. The last 2 parameters of the Exec function are VARIANT's. In this case
they can be "empty". Use TNoParam (I think).
Should look something like (off the top of my head):
GUID iidWebBrowser;
IIDFromString(L"{ED016940-BD5B-11cf-BA4E-00C04FD70816}", &iidWebBrowser);
IOleCommandTarget* pCmdTarget = 0;
pMyHTMLDoc2->QueryInterface(IID_IOleCommandTarget, (void**)&pCmdTarget);
if (pCmdTarget) {
int HTMLID_FIND = 1;
pCmdTarget->Exec(&iidWebBrowser, HTMLID_FIND, 0, TNoParam(),
TNoParam());
pCmdTarget->Release();
}
HTH,
Mark Finkle
"Albert Wiersch" <mrinternetnewsborland@wiersch.com> wrote in message
news:421be6ee$1@newsgroups.borland.com...
>
> Looks like I need more help. :-(
>
> Remy, you're right that OLECMDID_FIND is not supported in the manner that
> I was hoping it would be. Do you know the proper C++ code to show the Find
> dialog using TCppWebBrowser?
>
> This wasn't much help to me, but maybe it would be more help to someone
> else:
> http://members.shaw.ca/iedelphi/webbrowser.htm#advanced2
>
> Thank you.
>
> --
> Albert Wiersch
> http://www.htmlvalidator.com/
>
>
> "Albert Wiersch" <mrinternetnewsborland@wiersch.com> wrote in message
> news:421be1c2$1@newsgroups.borland.com...
>>
>> Just found this. If I can translate it to CPP I think it should work:
>> http://members.shaw.ca/iedelphi/webbrowser.htm#advanced2
>>
>> --
>> Albert Wiersch
>> http://www.htmlvalidator.com/
>
>
Technical Details
Message-ID:
<421c3875$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<421bcfa2$1@newsgroups.borland.com> <421bd738$1@newsgroups.borland.com> <421be1c2$1@newsgroups.borland.com> <421be6ee$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: feeec,767b6514a77617a0 X-Google-Attributes: gidfeeec,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Mark Finkle" <mark_finkle@no.spam.hotmail.com> Newsgroups: borland.public.cppbuilder.internet.web References: <421bcfa2$1@newsgroups.borland.com> <421bd738$1@newsgroups.borland.com> <421be1c2$1@newsgroups.borland.com> <421be6ee$1@newsgroups.borland.com> Subject: Re: Show Find dialog in TCppWebBrowser Date: Wed, 23 Feb 2005 03:02:20 -0500 Lines: 66 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Response NNTP-Posting-Host: 69.162.33.46 Message-ID: <421c3875$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1109145717 69.162.33.46 (23 Feb 2005 00:01:57 -0800) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail