Board index » cppbuilder » Combobox and Dropdown Box Interfaces?
Mitch McInelly
![]() CBuilder Developer |
Combobox and Dropdown Box Interfaces?2005-08-04 03:13:49 AM cppbuilder4 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 |