IHTMLWindow2::onscroll Property
--------------------------------------------------------------------------------
Sets or retrieves a pointer to the event handler function associated with the onscroll event.
Syntax
HRESULT IHTMLWindow2::get_onscroll(VARIANT *p);HRESULT IHTMLWindow2::put_onscroll(VARIANT v);
Parameters
p
Pointer to a variable of type VARIANT of type VT_DISPATCH that receives the IDispatch interface of an object with a default method that is invoked when the event occurs.
v
VARIANT of type VT_DISPATCH that specifies the IDispatch interface of an object with a default method that is invoked when the event occurs.
Return Value
Returns S_OK if successful, or an error value otherwise.
在捕获的ISPID_HTMLWINDOWEVENTS2_ONSCROLL 事件中
用HRESULT IHTMLElement2::get_scrollTop(long *p);得到滚动条位置
再HRESULT IHTMLElement2::put_scrollTop(long p);设置滚动条位置
捕捉WebBrowser页面的滚动条滚动事件
最新推荐文章于 2022-04-11 10:30:59 发布