Article View: borland.public.cppbuilder.internet.web
Article #1202Combobox and Dropdown Box Interfaces?
From: Mitch McInelly
Date: Wed, 03 Aug 2005 19:13
Date: Wed, 03 Aug 2005 19:13
47 lines
2484 bytes
2484 bytes
Can anyone tell me the correct mshtml interface so that I can read/set the
values and names of comboboxes and drop down lists displayed in a browser.
I've tried Gambit's...
TComInterface<IHTMLDocument2> Doc;
ActiveBrowser->Document->QueryInterface(IID_IHTMLDocument2,
(LPVOID*)&Doc);
if( Doc )
{
TComInterface<IHTMLElementCollection> All;
Doc->get_all(&All);
if( All )
{
long count = 0;
All->get_length(&count);
for(long idx = 0; idx < count; ++idx)
{
TVariant item = idx;
TVariant index = 0;
TComInterface<IDispatch> Disp;
All->item(item, index, &Disp);
if( Disp )
{ TComInterface<IHTMLInputElement> Input;
Disp->QueryInterface(IID_IHTMLInputElement,(LPVOID*)
&Input);
// AND Also tried
//TComInterface<IHTMLInputTextElement> Input;
//Disp->QueryInterface(IID_IHTMLInputTextElement,(LPVOID*)
&Input);
if( Input )
{ ...
... but it just skips over my combo boxes displayed in the browser. I need
to be able to see the combo box's name and set/read the selected value of
the box.
Thanks for looking.
Mitch
Technical Details
Message-ID:
<42f1176b$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!news.moat.net!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.spamkiller.net!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: feeec,7d001b48edf887db,start X-Google-Attributes: gidfeeec,public X-Google-Language: ENGLISH,ASCII-7-bit Reply-To: "Mitch McInelly" <mitch@agencysoftware.com> From: "Mitch McInelly" <mitch@agencysoftware.com> Newsgroups: borland.public.cppbuilder.internet.web Subject: Combobox and Dropdown Box Interfaces? Date: Wed, 3 Aug 2005 12:13:49 -0700 Lines: 49 Organization: Agency Software, Inc. X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 NNTP-Posting-Host: 207.88.115.45 Message-ID: <42f1176b$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1123096427 207.88.115.45 (3 Aug 2005 12:13:47 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!news.moat.net!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.spamkiller.net!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mail