Click to return to the Reusing Browser Technology home page    
IHTMLElement2::createCont...     IHTMLElement2::detachEven...     IHTMLElement2 Interface    
Web Workshop  |  Reusing Browser Technology

IHTMLElement2::currentStyle Method


Represents the current cascaded format and style as specified by global style sheets, inline styles, and HTML attributes.

Syntax

HRESULT currentStyle(
    IHTMLCurrentStyle **ppCurrentStyle
);

Parameters

ppCurrentStyle
Address of a pointer to the address of a currentStyle object.

Return Value

Returns S_OK if the function was bound successfully, or an error code otherwise.

Remarks

Through the currentStyle object returned by this method, cascaded style values of an object can be retrieved. Reading the currentStyle object differs from reading the style object, where style is not set inline on an object. For example, if the color property is set on a paragraph only through a linked or embedded style sheet, and not inline, then object.currentStyle.color will return the color, whereas object.style.color will not return a value. If, however, the author specifies <P STYLE="color:'red'">, both the currentStyle and style objects will return the value red.

See Also

STYLE



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.