IHTMLFontSizesCollection

IHTMLFontSizesCollection


This interface is for the collection of all the font sizes available for a font on the system. The collection of fonts and sizes that this is built from is maintained in the IHTMLOptionsHolder object. This interface is returned when that collection is accessed.

IHTMLFontSizesCollection Methods
get_length   get__newEnum  
get_forFont   item  

IHTMLFontSizesCollection::get_length

HRESULT get_length(
    long *p
);

Retrieves the number of elements in a collection.

p
Address of a long integer that receives the number of font sizes in the collection.

This property is read-write on the areas and the options collection for image maps and select boxes, respectively. This allows a developer to shrink the collection.

IHTMLFontSizesCollection::get__newEnum

HRESULT get__newEnum(
    IUnknown **p
);

Returns an OLE enumeration interface. This will enumerate over the sizes in this collection.

p
Address of a variable that receives the IUnknown interface pointer.

IHTMLFontSizesCollection::get_forFont

HRESULT get_forFont(
    BSTR *p
);

Returns a string of the font name that this collection of font sizes applies to.

p
Address of a string variable that receives the font name.

IHTMLFontSizesCollection::item

HRESULT item(
    long index,
    long *plSize
);

Retrieves a single element or a collection from the collection. The index parameter determines which action to take.

index
Address of a variable specifying the element or collection to retrieve. If this parameter is a number, the method returns the element in the collection at the given position, where the first element has value 0, the second has 1, and so on. If this parameter is a string, the method returns a collection of elements, where the value of the name or id property for each element is equal to the string.
plSize
Address of a variable that receives an element object or a collection of element objects if successful, or null otherwise.

© 1997 Microsoft Corporation. All rights reserved. Terms of Use.