IHTMLInputImage

IHTMLInputImage


This interface specifies a form input control.

IHTMLInputImage Methods
get_type   put_disabled   get_disabled  
put_border   get_border   put_vspace  
get_vspace   put_hspace   get_hspace  
put_alt   get_alt   put_src  
get_src   put_lowsrc   get_lowsrc  
get_vrml   put_dynsrc   get_dynsrc  
get_readyState   get_complete   put_loop  
get_loop   put_align   get_align  
put_onload   get_onload   put_onerror  
get_onerror   put_onabort   get_onabort  
put_name   get_name   put_width  
get_width   put_height   get_height  
put_start   get_start  

IHTMLInputImage::get_type

HRESULT get_type(
    BSTR *p
);

Retrieves the type of intrinsic control represented by the given element object.

p
Address of a variable that receives the type, which can be one of these values:

Element Possible value Description
INPUT checkbox Used for simple Boolean attributes or for attributes that can take multiple values at the same time. It is represented by a number of check box fields, each of which has the same name. Each selected check box generates a separate name/value pair in the submitted data, even if this results in duplicate names. The default value for check boxes is on.
file A file upload element.
hidden No field is presented to the user, but the content of the field is sent with the submitted form. This value can be used to transmit state information about client/server interaction.
image An image field which you can click, causing the form to be immediately submitted. The coordinates of the selected point are measured in pixel units from the upper-left corner of the image, and are returned (along with the other contents of the form) in two name/value pairs. The x-coordinate is submitted under the name of the field with .x appended, and the y-coordinate is submitted under the name of the field with .y appended. Any value property is ignored. The image itself is specified by the SRC attribute, exactly as for the Image element.
password The same as the TEXT attribute, except that text is not displayed as the user enters it.
radio Used for attributes that accept a single value from a set of alternatives. Each radio-button field in the group should be given the same name. Only the selected radio button in the group generates a name/value pair in the submitted data. Radio buttons require an explicit value property.
reset reset is a button that when clicked resets the form's fields to their specified initial values. The label to be displayed on the button can be specified just as for the submit button.
submit submit is a button that when clicked submits the form. You can use the value attribute to provide a non-editable label to be displayed on the button. The default label is application-specific. If a submit button is clicked to submit the form, and that button has a name attribute specified, then that button contributes a name/value pair to the submitted data. Otherwise, a submit button makes no contribution to the submitted data.
text Used for a single-line text-entry field. Use in conjunction with the size and maxLength property.
SELECT select-multiple Specifies a multiple-select list box.
select-one Specifies a single-select list box.
TEXTAREA textarea Used for multiple-line text-entry fields. Use in conjunction with the size and maxLength properties.

IHTMLInputImage::put_disabled

HRESULT put_disabled(
    VARIANT_BOOL v
);

Enables or disables the control. A disabled control appears dimmed and does not respond to user input.

v
Boolean value specifying whether to disable the control. If TRUE, the control is disabled; otherwise, it is enabled.

The default value for this property is FALSE.

See also get_disabled

IHTMLInputImage::get_disabled

HRESULT get_disabled(
    VARIANT_BOOL *p
);

Determines whether the control is enabled or disabled.

p
Address of a variable that receives TRUE if the control is disabled, or FALSE otherwise.

The default value for this property is FALSE.

See also put_disabled

IHTMLInputImage::put_border

HRESULT put_border(
    VARIANT v
);

Sets the thickness of the border around the element.

v
String or value specifying the border thickness.

See also get_border

IHTMLInputImage::get_border

HRESULT get_border(
    VARIANT *p
);

Retrieves the current thickness of the border around the element.

p
Address of a variable that receives the border thickness.

See also put_border

IHTMLInputImage::put_vspace

HRESULT put_vspace(
    long v
);

Sets the vertical margins for the element.

v
Value specifying the margins.

Similar to border, except the margins are not painted with color when the element is a link.

See also get_vspace

IHTMLInputImage::get_vspace

HRESULT get_vspace(
    long *p
);

Retrieves the vertical margins for the element.

p
Address of a variable that receives the vertical margins.

Similar to border, except the margins are not painted with color when the element is a link.

See also put_vspace

IHTMLInputImage::put_hspace

HRESULT put_hspace(
    long v
);

Sets the horizontal margins for the element.

v
Value specifying the horizontal margins.

Similar to border, except the margins are not painted with color when the element is a link.

See also get_hspace

IHTMLInputImage::get_hspace

HRESULT get_hspace(
    long *p
);

Retrieves the horizontal margins for the element.

p
Address of a variable that receives the horizontal margins.

Similar to border, except the margins are not painted with color when the element is a link.

See also put_hspace

IHTMLInputImage::put_alt

HRESULT put_alt(
    BSTR v
);

Indicates optional text as an alternative to the graphic for rendering in nongraphical environments. Alternate text should be provided whenever the graphic is not rendered. Alternate text is mandatory for Level 0 documents.

v
String specifying the optional text.

See also get_alt

IHTMLInputImage::get_alt

HRESULT get_alt(
    BSTR *p
);

Retrieves the optional text as an alternative to the graphic for rendering in nongraphical environments. Alternate text should be provided whenever the graphic is not rendered. Alternate text is mandatory for Level 0 documents.

p
Address of a variable that receives the optional text.

See also put_alt

IHTMLInputImage::put_src

HRESULT put_src(
    BSTR v
);

Sets the URL of an image to be shown.

v
String specifying the URL.

See also get_src

IHTMLnputImage::get_src

HRESULT get_src(
    BSTR *p
);

Retrieves the URL of the image.

p
Address of a variable that receives the URL.

See also put_src

IHTMLInputImage::put_lowsrc

HRESULT put_lowsrc(
    BSTR v
);

Specifies the URL of a lower-resolution image to display.

v
String specifying the URL.

Setting the SRC= attribute in code has the side-effect of actually starting to load the new URL into the image area (and aborting the transfer of any image data that is already loading into the same area). Therefore, you should alter the lowsrc property before setting the src property. If the URL in the src property refers to an image that is not the same size as the image cell it is loaded into, the source image is scaled to fit.

See also get_lowsrc

IHTMLInputImage::get_lowsrc

HRESULT get_lowsrc(
    BSTR *p
);

Retrieves the URL of a lower-resolution image to display.

p
Address of a variable that receives the URL.

Setting the SRC= attribute in code has the side-effect of actually starting to load the new URL into the image area (and aborting the transfer of any image data that is already loading into the same area). Therefore, you should alter the lowsrc property before setting the src property. If the URL in the src property refers to an image that is not the same size as the image cell it is loaded into, the source image is scaled to fit.

See also put_lowsrc

IHTMLInputImage::put_vrml

HRESULT put_vrml(
    BSTR v
);

Specifies the URL of a VRML world to be displayed in the window.

v
String specifying the URL.

IHTMLInputImage::get_vrml

HRESULT get_vrml(
    BSTR *p
);

Retrieves the URL of the VRML world to be displayed in the window.

p
Address of a variable that receives the URL.

IHTMLInputImage::put_dynsrc

HRESULT put_dynsrc(
    BSTR v
);

Sets the address of a video clip or VRML world to be displayed in the window.

v
String specifying the address.

See also get_dynsrc

IHTMLInputImage::get_dynsrc

HRESULT get_dynsrc(
    BSTR *p
);

Retrieves the address of a video clip or VRML world to be displayed in the window.

p
Address of a variable that receives the address.

See also put_dynsrc

IHTMLInputImage::get_readyState

HRESULT get_readyState(
    BSTR *p
);

Retrieves the current state of an object being downloaded.

p
Address of a variable that receives the state. Can be one of these values:
complete The object is completely loaded.
interactive The object can be interacted with even though it is not fully loaded.
loading The object is currently being loaded.
unitialized The object is not created. Usually when the object is being downloaded.

Each object can independently determine which of the states it exposes.

IHTMLInputImage::get_complete

HRESULT get_complete(
    VARIANT_BOOL *p
);

Retrieves whether the specified element is fully loaded.

p
Address of a variable that receives TRUE if the element is fully loaded, or FALSE otherwise.

IHTMLInputImage::put_loop

HRESULT put_loop(
    VARIANT v
);

Sets the number of times a video will loop when activated.

v
Value specifying the number of times to loop. If this parameter is -1 (infinite), the video will loop continuously.

Below are descriptions on how loop works for some boundary cases.
<BGSOUND src="file:///c:\win95\system\msremind.wav"> once
<BGSOUND src="file:///c:\win95\system\msremind.wav" LOOP> once
<BGSOUND src="file:///c:\win95\system\msremind.wav" LOOP=> zero times
<BGSOUND src="file:///c:\win95\system\msremind.wav" LOOP=-1> infinitely
<BGSOUND src="file:///c:\win95\system\msremind.wav" LOOP=0> once

See also get_loop

IHTMLInputImage::get_loop

HRESULT get_loop(
    VARIANT *p
);

Retrieves the number of times a video loops when activated.

p
Value specifying the number of times to loop. If this parameter receives -1 (infinite), the video will loop continuously.

Below are descriptions on how loop works for some boundary cases.
<BGSOUND src="file:///c:\win95\system\msremind.wav"> once
<BGSOUND src="file:///c:\win95\system\msremind.wav" LOOP> once
<BGSOUND src="file:///c:\win95\system\msremind.wav" LOOP=> zero times
<BGSOUND src="file:///c:\win95\system\msremind.wav" LOOP=-1> infinitely
<BGSOUND src="file:///c:\win95\system\msremind.wav" LOOP=0> once

See also put_loop

IHTMLInputImage::put_align

HRESULT put_align(
    BSTR v
);

Sets how the element is aligned with adjacent text.

v
String specifying the alignment. Can be one of these values:
absbottom Aligns the bottom of the element with the absolute bottom of the surrounding text. The absolute bottom is equal to the baseline of the text minus the height of the largest descender in the text.
absmiddle Aligns the middle of the element with the middle of the surrounding text. The absolute middle is the midpoint between the absolute bottom and texttop of the surrounding text.
baseline Aligns the bottom of the element with the baseline of the surrounding text.
bottom Aligns the bottom of the element with the bottom of the surrounding text. The bottom is equal to the baseline minus the standard height of a descender in the text.
left Aligns the element to the left of the surrounding text. All preceding and subsequent text flows to the right of the element. This is the default value.
middle Aligns the middle of the element with the surrounding text.
right Aligns the element to the right of the surrounding text. All subsequent text flows to the left of the element.
texttop Aligns the top of the element with the absolute top of the surrounding text. The absolute top is the baseline plus the height of the largest ascender in the text.
top Aligns the top of the element with the top of the text. The top of the text is the baseline plus the standard height of an ascender in the text.

For the INPUT element, this attribute applies only to the image type. It is undefined for all other types.

See also get_align

IHTMLInputImage::get_align

HRESULT get_align(
    BSTR *p
);

Retrieves how the element is aligned with adjacent text.

p
Address of a variable that receives the alignment. Can be one of these values:
absbottom Aligns the bottom of the element with the absolute bottom of the surrounding text. The absolute bottom is equal to the baseline of the text minus the height of the largest descender in the text.
absmiddle Aligns the middle of the element with the middle of the surrounding text. The absolute middle is the midpoint between the absolute bottom and texttop of the surrounding text.
baseline Aligns the bottom of the element with the baseline of the surrounding text.
bottom Aligns the bottom of the element with the bottom of the surrounding text. The bottom is equal to the baseline minus the standard height of a descender in the text.
left Aligns the element to the left of the surrounding text. All preceding and subsequent text flows to the right of the element. This is the default value.
middle Aligns the middle of the element with the surrounding text.
right Aligns the element to the right of the surrounding text. All subsequent text flows to the left of the element.
texttop Aligns the top of the element with the absolute top of the surrounding text. The absolute top is the baseline plus the height of the largest ascender in the text.
top Aligns the top of the element with the top of the text. The top of the text is the baseline plus the standard height of an ascender in the text.

For the INPUT element, this attribute applies only to the image type. It is undefined for all other types.

See also put_align

IHTMLInputImage::put_onload

HRESULT put_onload(
    VARIANT v
);

Sets the inline script associated with the onload event for an INPUT type=image element. An onload event occurs immediately after the browser loads the given object.

v
VARIANT structure that contains the new script.

See also get_onload

IHTMLInputImage::get_onload

HRESULT get_onload(
    VARIANT *p
);

Retrieves the inline script associated with the onload event for an INPUT type=image element. An onload event occurs immediately after the browser loads the given object.

p
Address of a VARIANT structure that receives the script.

See also put_onload

IHTMLInputImage::put_onerror

HRESULT put_onerror(
    VARIANT v
);

Sets the inline script associated with the onerror event for an INPUT type=image element. An onerror event occurs when the loading of a document or image causes an error.

v
VARIANT structure that contains the new script.

See also get_onerror

IHTMLInputImage::get_onerror

HRESULT get_onerror(
    VARIANT *p
);

Retrieves the inline script associated with the onerror event for an INPUT type=image element. An onerror event occurs when the loading of a document or image causes an error.

p
Address of a VARIANT structure that receives the script.

See also put_onerror

IHTMLInputImage::put_onabort

HRESULT put_onabort(
    VARIANT v
);

Sets the inline script associated with the onabort event for an INPUT type=image element. An onabort event occurs when the loading of a document or image causes an error.

v
VARIANT structure that contains the new script.

See also get_onabort

IHTMLInputImage::get_onabort

HRESULT get_onabort(
    VARIANT *p
);

Retrieves the inline script associated with the onabort event for an INPUT type=image element. An onabort event occurs when the loading of a document or image causes an error.

p
Address of a VARIANT structure that receives the script.

See also put_onabort

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