Win32 API 日本語リファレンス
ホームWeb.MsHtml › IHTMLElement

IHTMLElement

COMIDispatch (デュアル)
IDispatch を実装(デュアルインターフェース)。HSP では comobj 経由でメソッド名による遅延バインド呼び出しができます(vtableインデックス不要)。
IID3050f1ff-98b5-11cf-bb82-00aa00bdce0b継承元IDispatch呼び出し名前(IDispatch) または vtbl自前メソッド開始 vtbl7

メソッド 87

vtbl = vtable インデックス(0始まり)。IDispatch 実装のため HSP ではメソッド名でも呼べます(上記)。低レベルの index 呼び出し用に vtbl も掲載。0〜2 は IUnknown。

vtbl 7 HRESULT setAttribute(LPWSTR strAttributeName, VARIANT AttributeValue, INT lFlags)
strAttributeNameLPWSTRin設定する属性の名前を指定する。
AttributeValueVARIANTin属性に設定する値を指定する。
lFlagsINTin大文字小文字の区別など、属性設定の動作を制御するフラグを指定する。
vtbl 8 HRESULT getAttribute(LPWSTR strAttributeName, INT lFlags, VARIANT* AttributeValue)
strAttributeNameLPWSTRin取得する属性の名前を指定する。
lFlagsINTin大文字小文字の区別など、属性取得の動作を制御するフラグを指定する。
AttributeValueVARIANT*out属性の値を受け取るポインタである。
vtbl 9 HRESULT removeAttribute(LPWSTR strAttributeName, INT lFlags, VARIANT_BOOL* pfSuccess)
strAttributeNameLPWSTRin削除する属性の名前を指定する。
lFlagsINTin大文字小文字の区別など、属性削除の動作を制御するフラグを指定する。
pfSuccessVARIANT_BOOL*out削除に成功したかどうかを受け取るポインタである。
vtbl 10 HRESULT put_className(LPWSTR v)
vLPWSTRinクラス名(class 属性) に設定する値を指定する。
vtbl 11 HRESULT get_className(LPWSTR* p)
pLPWSTR*outクラス名(class 属性) を受け取るポインタである。NULL は指定できない。
vtbl 12 HRESULT put_id(LPWSTR v)
vLPWSTRin識別子(id) に設定する値を指定する。
vtbl 13 HRESULT get_id(LPWSTR* p)
pLPWSTR*out識別子(id) を受け取るポインタである。NULL は指定できない。
vtbl 14 HRESULT get_tagName(LPWSTR* p)
pLPWSTR*outタグ名 を受け取るポインタである。NULL は指定できない。
vtbl 15 HRESULT get_parentElement(IHTMLElement** p)
pIHTMLElement**out親要素 を受け取るポインタである。NULL は指定できない。
vtbl 16 HRESULT get_style(IHTMLStyle** p)
pIHTMLStyle**outスタイル を受け取るポインタである。NULL は指定できない。
vtbl 17 HRESULT put_onhelp(VARIANT v)
vVARIANTinonhelp(イベントハンドラ)に設定する値を指定する。
vtbl 18 HRESULT get_onhelp(VARIANT* p)
pVARIANT*outonhelp(イベントハンドラ)を受け取るポインタである。NULL は指定できない。
vtbl 19 HRESULT put_onclick(VARIANT v)
vVARIANTinonclick(イベントハンドラ)に設定する値を指定する。
vtbl 20 HRESULT get_onclick(VARIANT* p)
pVARIANT*outonclick(イベントハンドラ)を受け取るポインタである。NULL は指定できない。
vtbl 21 HRESULT put_ondblclick(VARIANT v)
vVARIANTinondblclick(イベントハンドラ)に設定する値を指定する。
vtbl 22 HRESULT get_ondblclick(VARIANT* p)
pVARIANT*outondblclick(イベントハンドラ)を受け取るポインタである。NULL は指定できない。
vtbl 23 HRESULT put_onkeydown(VARIANT v)
vVARIANTinonkeydown(イベントハンドラ)に設定する値を指定する。
vtbl 24 HRESULT get_onkeydown(VARIANT* p)
pVARIANT*outonkeydown(イベントハンドラ)を受け取るポインタである。NULL は指定できない。
vtbl 25 HRESULT put_onkeyup(VARIANT v)
vVARIANTinonkeyup(イベントハンドラ)に設定する値を指定する。
vtbl 26 HRESULT get_onkeyup(VARIANT* p)
pVARIANT*outonkeyup(イベントハンドラ)を受け取るポインタである。NULL は指定できない。
vtbl 27 HRESULT put_onkeypress(VARIANT v)
vVARIANTinonkeypress(イベントハンドラ)に設定する値を指定する。
vtbl 28 HRESULT get_onkeypress(VARIANT* p)
pVARIANT*outonkeypress(イベントハンドラ)を受け取るポインタである。NULL は指定できない。
vtbl 29 HRESULT put_onmouseout(VARIANT v)
vVARIANTinonmouseout(イベントハンドラ)に設定する値を指定する。
vtbl 30 HRESULT get_onmouseout(VARIANT* p)
pVARIANT*outonmouseout(イベントハンドラ)を受け取るポインタである。NULL は指定できない。
vtbl 31 HRESULT put_onmouseover(VARIANT v)
vVARIANTinonmouseover(イベントハンドラ)に設定する値を指定する。
vtbl 32 HRESULT get_onmouseover(VARIANT* p)
pVARIANT*outonmouseover(イベントハンドラ)を受け取るポインタである。NULL は指定できない。
vtbl 33 HRESULT put_onmousemove(VARIANT v)
vVARIANTinonmousemove(イベントハンドラ)に設定する値を指定する。
vtbl 34 HRESULT get_onmousemove(VARIANT* p)
pVARIANT*outonmousemove(イベントハンドラ)を受け取るポインタである。NULL は指定できない。
vtbl 35 HRESULT put_onmousedown(VARIANT v)
vVARIANTinonmousedown(イベントハンドラ)に設定する値を指定する。
vtbl 36 HRESULT get_onmousedown(VARIANT* p)
pVARIANT*outonmousedown(イベントハンドラ)を受け取るポインタである。NULL は指定できない。
vtbl 37 HRESULT put_onmouseup(VARIANT v)
vVARIANTinonmouseup(イベントハンドラ)に設定する値を指定する。
vtbl 38 HRESULT get_onmouseup(VARIANT* p)
pVARIANT*outonmouseup(イベントハンドラ)を受け取るポインタである。NULL は指定できない。
vtbl 39 HRESULT get_document(IDispatch** p)
pIDispatch**out所属ドキュメント を受け取るポインタである。NULL は指定できない。
vtbl 40 HRESULT put_title(LPWSTR v)
vLPWSTRinタイトル(title 属性) に設定する値を指定する。
vtbl 41 HRESULT get_title(LPWSTR* p)
pLPWSTR*outタイトル(title 属性) を受け取るポインタである。NULL は指定できない。
vtbl 42 HRESULT put_language(LPWSTR v)
vLPWSTRinスクリプト言語(language 属性) に設定する値を指定する。
vtbl 43 HRESULT get_language(LPWSTR* p)
pLPWSTR*outスクリプト言語(language 属性) を受け取るポインタである。NULL は指定できない。
vtbl 44 HRESULT put_onselectstart(VARIANT v)
vVARIANTinonselectstart(イベントハンドラ)に設定する値を指定する。
vtbl 45 HRESULT get_onselectstart(VARIANT* p)
pVARIANT*outonselectstart(イベントハンドラ)を受け取るポインタである。NULL は指定できない。
vtbl 46 HRESULT scrollIntoView(VARIANT varargStart)
varargStartVARIANTin先頭を表示する場合は true、末尾を表示する場合は false を指定する。省略可能。
vtbl 47 HRESULT contains(IHTMLElement* pChild, VARIANT_BOOL* pfResult)
pChildIHTMLElement*in子要素かどうかを判定する対象の要素を指定する。
pfResultVARIANT_BOOL*out指定要素を含むかどうかを受け取るポインタである。
vtbl 48 HRESULT get_sourceIndex(INT* p)
pINT*outソース順のインデックス を受け取るポインタである。NULL は指定できない。
vtbl 49 HRESULT get_recordNumber(VARIANT* p)
pVARIANT*outレコード番号 を受け取るポインタである。NULL は指定できない。
vtbl 50 HRESULT put_lang(LPWSTR v)
vLPWSTRin言語(lang 属性) に設定する値を指定する。
vtbl 51 HRESULT get_lang(LPWSTR* p)
pLPWSTR*out言語(lang 属性) を受け取るポインタである。NULL は指定できない。
vtbl 52 HRESULT get_offsetLeft(INT* p)
pINT*outオフセット親からの左位置 を受け取るポインタである。NULL は指定できない。
vtbl 53 HRESULT get_offsetTop(INT* p)
pINT*outオフセット親からの上位置 を受け取るポインタである。NULL は指定できない。
vtbl 54 HRESULT get_offsetWidth(INT* p)
pINT*outレイアウト幅 を受け取るポインタである。NULL は指定できない。
vtbl 55 HRESULT get_offsetHeight(INT* p)
pINT*outレイアウト高さ を受け取るポインタである。NULL は指定できない。
vtbl 56 HRESULT get_offsetParent(IHTMLElement** p)
pIHTMLElement**outオフセット基準の親要素 を受け取るポインタである。NULL は指定できない。
vtbl 57 HRESULT put_innerHTML(LPWSTR v)
vLPWSTRin内側の HTML に設定する値を指定する。
vtbl 58 HRESULT get_innerHTML(LPWSTR* p)
pLPWSTR*out内側の HTML を受け取るポインタである。NULL は指定できない。
vtbl 59 HRESULT put_innerText(LPWSTR v)
vLPWSTRin内側のテキスト に設定する値を指定する。
vtbl 60 HRESULT get_innerText(LPWSTR* p)
pLPWSTR*out内側のテキスト を受け取るポインタである。NULL は指定できない。
vtbl 61 HRESULT put_outerHTML(LPWSTR v)
vLPWSTRin要素を含む HTML に設定する値を指定する。
vtbl 62 HRESULT get_outerHTML(LPWSTR* p)
pLPWSTR*out要素を含む HTML を受け取るポインタである。NULL は指定できない。
vtbl 63 HRESULT put_outerText(LPWSTR v)
vLPWSTRin要素を含むテキスト に設定する値を指定する。
vtbl 64 HRESULT get_outerText(LPWSTR* p)
pLPWSTR*out要素を含むテキスト を受け取るポインタである。NULL は指定できない。
vtbl 65 HRESULT insertAdjacentHTML(LPWSTR where, LPWSTR html)
whereLPWSTRin挿入位置(beforeBegin/afterBegin/beforeEnd/afterEnd)を指定する。
htmlLPWSTRin挿入する HTML 文字列を指定する。
vtbl 66 HRESULT insertAdjacentText(LPWSTR where, LPWSTR text)
whereLPWSTRin挿入位置(beforeBegin/afterBegin/beforeEnd/afterEnd)を指定する。
textLPWSTRin挿入するテキストを指定する。
vtbl 67 HRESULT get_parentTextEdit(IHTMLElement** p)
pIHTMLElement**out親のテキスト編集要素 を受け取るポインタである。NULL は指定できない。
vtbl 68 HRESULT get_isTextEdit(VARIANT_BOOL* p)
pVARIANT_BOOL*outテキスト編集可能かどうか を受け取るポインタである。NULL は指定できない。
vtbl 69 HRESULT click()
vtbl 70 HRESULT get_filters(IHTMLFiltersCollection** p)
pIHTMLFiltersCollection**outフィルタのコレクション を受け取るポインタである。NULL は指定できない。
vtbl 71 HRESULT put_ondragstart(VARIANT v)
vVARIANTinondragstart(イベントハンドラ)に設定する値を指定する。
vtbl 72 HRESULT get_ondragstart(VARIANT* p)
pVARIANT*outondragstart(イベントハンドラ)を受け取るポインタである。NULL は指定できない。
vtbl 73 HRESULT toString(LPWSTR* String)
StringLPWSTR*outオブジェクトの文字列表現を受け取るポインタである。
vtbl 74 HRESULT put_onbeforeupdate(VARIANT v)
vVARIANTinonbeforeupdate(イベントハンドラ)に設定する値を指定する。
vtbl 75 HRESULT get_onbeforeupdate(VARIANT* p)
pVARIANT*outonbeforeupdate(イベントハンドラ)を受け取るポインタである。NULL は指定できない。
vtbl 76 HRESULT put_onafterupdate(VARIANT v)
vVARIANTinonafterupdate(イベントハンドラ)に設定する値を指定する。
vtbl 77 HRESULT get_onafterupdate(VARIANT* p)
pVARIANT*outonafterupdate(イベントハンドラ)を受け取るポインタである。NULL は指定できない。
vtbl 78 HRESULT put_onerrorupdate(VARIANT v)
vVARIANTinonerrorupdate(イベントハンドラ)に設定する値を指定する。
vtbl 79 HRESULT get_onerrorupdate(VARIANT* p)
pVARIANT*outonerrorupdate(イベントハンドラ)を受け取るポインタである。NULL は指定できない。
vtbl 80 HRESULT put_onrowexit(VARIANT v)
vVARIANTinonrowexit(イベントハンドラ)に設定する値を指定する。
vtbl 81 HRESULT get_onrowexit(VARIANT* p)
pVARIANT*outonrowexit(イベントハンドラ)を受け取るポインタである。NULL は指定できない。
vtbl 82 HRESULT put_onrowenter(VARIANT v)
vVARIANTinonrowenter(イベントハンドラ)に設定する値を指定する。
vtbl 83 HRESULT get_onrowenter(VARIANT* p)
pVARIANT*outonrowenter(イベントハンドラ)を受け取るポインタである。NULL は指定できない。
vtbl 84 HRESULT put_ondatasetchanged(VARIANT v)
vVARIANTinondatasetchanged(イベントハンドラ)に設定する値を指定する。
vtbl 85 HRESULT get_ondatasetchanged(VARIANT* p)
pVARIANT*outondatasetchanged(イベントハンドラ)を受け取るポインタである。NULL は指定できない。
vtbl 86 HRESULT put_ondataavailable(VARIANT v)
vVARIANTinondataavailable(イベントハンドラ)に設定する値を指定する。
vtbl 87 HRESULT get_ondataavailable(VARIANT* p)
pVARIANT*outondataavailable(イベントハンドラ)を受け取るポインタである。NULL は指定できない。
vtbl 88 HRESULT put_ondatasetcomplete(VARIANT v)
vVARIANTinondatasetcomplete(イベントハンドラ)に設定する値を指定する。
vtbl 89 HRESULT get_ondatasetcomplete(VARIANT* p)
pVARIANT*outondatasetcomplete(イベントハンドラ)を受け取るポインタである。NULL は指定できない。
vtbl 90 HRESULT put_onfilterchange(VARIANT v)
vVARIANTinonfilterchange(イベントハンドラ)に設定する値を指定する。
vtbl 91 HRESULT get_onfilterchange(VARIANT* p)
pVARIANT*outonfilterchange(イベントハンドラ)を受け取るポインタである。NULL は指定できない。
vtbl 92 HRESULT get_children(IDispatch** p)
pIDispatch**out子要素のコレクション を受け取るポインタである。NULL は指定できない。
vtbl 93 HRESULT get_all(IDispatch** p)
pIDispatch**out全子要素のコレクション を受け取るポインタである。NULL は指定できない。

HSP用 COM定義

#usecom / #comfunc によるHSPのCOM呼び出し定義。数字は vtbl インデックス(0始まり)。クラスIDが無い場合 #usecom の末尾は "{}"、ある場合は "{CLSID}"

出力引数:
#define global IID_IHTMLElement "{3050F1FF-98B5-11CF-BB82-00AA00BDCE0B}"
#usecom global IHTMLElement IID_IHTMLElement "{}"
#comfunc global IHTMLElement_setAttribute           7 wstr,int,int
#comfunc global IHTMLElement_getAttribute           8 wstr,int,var
#comfunc global IHTMLElement_removeAttribute        9 wstr,int,var
#comfunc global IHTMLElement_put_className          10 wstr
#comfunc global IHTMLElement_get_className          11 var
#comfunc global IHTMLElement_put_id                 12 wstr
#comfunc global IHTMLElement_get_id                 13 var
#comfunc global IHTMLElement_get_tagName            14 var
#comfunc global IHTMLElement_get_parentElement      15 sptr
#comfunc global IHTMLElement_get_style              16 sptr
#comfunc global IHTMLElement_put_onhelp             17 int
#comfunc global IHTMLElement_get_onhelp             18 var
#comfunc global IHTMLElement_put_onclick            19 int
#comfunc global IHTMLElement_get_onclick            20 var
#comfunc global IHTMLElement_put_ondblclick         21 int
#comfunc global IHTMLElement_get_ondblclick         22 var
#comfunc global IHTMLElement_put_onkeydown          23 int
#comfunc global IHTMLElement_get_onkeydown          24 var
#comfunc global IHTMLElement_put_onkeyup            25 int
#comfunc global IHTMLElement_get_onkeyup            26 var
#comfunc global IHTMLElement_put_onkeypress         27 int
#comfunc global IHTMLElement_get_onkeypress         28 var
#comfunc global IHTMLElement_put_onmouseout         29 int
#comfunc global IHTMLElement_get_onmouseout         30 var
#comfunc global IHTMLElement_put_onmouseover        31 int
#comfunc global IHTMLElement_get_onmouseover        32 var
#comfunc global IHTMLElement_put_onmousemove        33 int
#comfunc global IHTMLElement_get_onmousemove        34 var
#comfunc global IHTMLElement_put_onmousedown        35 int
#comfunc global IHTMLElement_get_onmousedown        36 var
#comfunc global IHTMLElement_put_onmouseup          37 int
#comfunc global IHTMLElement_get_onmouseup          38 var
#comfunc global IHTMLElement_get_document           39 sptr
#comfunc global IHTMLElement_put_title              40 wstr
#comfunc global IHTMLElement_get_title              41 var
#comfunc global IHTMLElement_put_language           42 wstr
#comfunc global IHTMLElement_get_language           43 var
#comfunc global IHTMLElement_put_onselectstart      44 int
#comfunc global IHTMLElement_get_onselectstart      45 var
#comfunc global IHTMLElement_scrollIntoView         46 int
#comfunc global IHTMLElement_contains               47 sptr,var
#comfunc global IHTMLElement_get_sourceIndex        48 var
#comfunc global IHTMLElement_get_recordNumber       49 var
#comfunc global IHTMLElement_put_lang               50 wstr
#comfunc global IHTMLElement_get_lang               51 var
#comfunc global IHTMLElement_get_offsetLeft         52 var
#comfunc global IHTMLElement_get_offsetTop          53 var
#comfunc global IHTMLElement_get_offsetWidth        54 var
#comfunc global IHTMLElement_get_offsetHeight       55 var
#comfunc global IHTMLElement_get_offsetParent       56 sptr
#comfunc global IHTMLElement_put_innerHTML          57 wstr
#comfunc global IHTMLElement_get_innerHTML          58 var
#comfunc global IHTMLElement_put_innerText          59 wstr
#comfunc global IHTMLElement_get_innerText          60 var
#comfunc global IHTMLElement_put_outerHTML          61 wstr
#comfunc global IHTMLElement_get_outerHTML          62 var
#comfunc global IHTMLElement_put_outerText          63 wstr
#comfunc global IHTMLElement_get_outerText          64 var
#comfunc global IHTMLElement_insertAdjacentHTML     65 wstr,wstr
#comfunc global IHTMLElement_insertAdjacentText     66 wstr,wstr
#comfunc global IHTMLElement_get_parentTextEdit     67 sptr
#comfunc global IHTMLElement_get_isTextEdit         68 var
#comfunc global IHTMLElement_click                  69
#comfunc global IHTMLElement_get_filters            70 sptr
#comfunc global IHTMLElement_put_ondragstart        71 int
#comfunc global IHTMLElement_get_ondragstart        72 var
#comfunc global IHTMLElement_toString               73 var
#comfunc global IHTMLElement_put_onbeforeupdate     74 int
#comfunc global IHTMLElement_get_onbeforeupdate     75 var
#comfunc global IHTMLElement_put_onafterupdate      76 int
#comfunc global IHTMLElement_get_onafterupdate      77 var
#comfunc global IHTMLElement_put_onerrorupdate      78 int
#comfunc global IHTMLElement_get_onerrorupdate      79 var
#comfunc global IHTMLElement_put_onrowexit          80 int
#comfunc global IHTMLElement_get_onrowexit          81 var
#comfunc global IHTMLElement_put_onrowenter         82 int
#comfunc global IHTMLElement_get_onrowenter         83 var
#comfunc global IHTMLElement_put_ondatasetchanged   84 int
#comfunc global IHTMLElement_get_ondatasetchanged   85 var
#comfunc global IHTMLElement_put_ondataavailable    86 int
#comfunc global IHTMLElement_get_ondataavailable    87 var
#comfunc global IHTMLElement_put_ondatasetcomplete  88 int
#comfunc global IHTMLElement_get_ondatasetcomplete  89 var
#comfunc global IHTMLElement_put_onfilterchange     90 int
#comfunc global IHTMLElement_get_onfilterchange     91 var
#comfunc global IHTMLElement_get_children           92 sptr
#comfunc global IHTMLElement_get_all                93 sptr
; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。
; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。
; ※出力/バッファ引数は var(変数直渡し)。varptr 方式にも切替可。
; ※ハンドル/void*等の不透明ポインタは IronHSP では intptr 指定が可能。
; ※IDispatch 実装。HSP では comobj 経由でメソッド名による呼び出しも可能(vtbl 不要)。