Click to return to the Reusing Browser Technology home page    
IHTMLOptionElementFactory...     IHTMLOptionsHolder Interf...     IHTMLOptionElementFactory...    
Web Workshop  |  Reusing Browser Technology

IHTMLOptionElementFactory::create Method


Creates a new instance of the OPTION element. You can add the element to a SELECT block by using the IHTMLSelectElement::add method.

Syntax

HRESULT create( 
    VARIANT text,
    VARIANT value,
    VARIANT defaultselected,
    VARIANT selected,
    IHTMLOptionElement **__MIDL_0017 
);

Parameters

text
Value or string that specifies the text of the element.
value
String that specifies the value of the element.
defaultselected
Value that indicates whether this option is selected by default. If TRUE, this option is selected by default; otherwise, it isn't.
selected
Value that indicates whether this is the default option in the SELECT block. If TRUE, this option is the default; otherwise, it isn't.
__MIDL_0017
Address of a variable that receives an interface pointer for the new OPTION element.

Return Value

Returns S_OK if successful, or an error code otherwise.

Windows CE

Windows CE Use version 2.12 and later
Minimum availability Internet Explorer 4.0

See Also

IHTMLOptionElement


Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.