首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏ascii0x03的安全笔记

    IE的BHO通过IHTMLDocument2接口获得网页源代码

    int detect_AppCache(IHTMLDocument2* pDocument) { CComPtr<IHTMLElementCollection> spHTML; HRESULT hr

    1.1K50发布于 2018-04-12
  • 来自专栏方亮

    如何定制一款12306抢票浏览器——实现自动查询和预订功能

    http://www.12306.cn/mormhweb/kyfw/         2 该页面否有查询按钮 BOOL CDeal12306WebPage::IsQueryPage( CComPtr<IHTMLDocument2 HRESULT CDeal12306WebPage::GetIFrameDoc( CComPtr<IHTMLDocument2>& spDoc, const CString& cstrIFrameName > & spDoc, CComPtr<IHTMLDocument2> & spInnerDoc ) { HRESULT hr = E_FAIL; do { hr > & spQueryButtonElem ) { HRESULT hr = E_FAIL; do { CComPtr<IHTMLDocument2> spMainDoc HRESULT CDeal12306WebPage::InsertButtonInQueryPage( CComPtr<IHTMLDocument2> & spDoc ) { HRESULT hr

    97920发布于 2019-01-16
  • 来自专栏跟着阿笨一起玩NET

    C# 在 webBrowser 光标处插入 html代码 .

    = "")             {                 IHTMLDocument2 doc = (IHTMLDocument2)this.webBrowser1.Document.DomDocument

    2K10发布于 2018-09-18
  • 来自专栏全栈程序员必看

    关于MSHTML_Html格式

    举例来说,使用这一个映射,你能够看到IHTMLDocument2接口映射到文档对象。对接口的进一步的研究说明了怎样通过get_和put_方法訪问对象的属性。 SCRIPT> <BODY onload=”Loaded()”> </BODY> </HTML> 获得文档接口 要開始使用对象模型接口,就要从文档获得IHTMLDocument2 使用文档接口 使用文档接口 一旦你获得了文档接口,你就能够使用不论什么一个IHTMLDocument2接口获得或改动文档的属性。 all集合对象是通过使用IHTMLDocument2::all 方法获得的。 这种方法返回一个包括文档的全部元素的IHTMLElementCollection接口。

    1.3K30编辑于 2022-09-20
  • 来自专栏全栈程序员必看

    mshtml一些用法

    tags集合 CString allPointData; IDispatch *pDisp = webbrowser.get_Document(); IHTMLDocument2 IHTMLScriptElement用法 CString allPointData; IDispatch *pDisp = webbrowser.get_Document(); IHTMLDocument2

    49530编辑于 2022-07-25
  • 来自专栏方亮

    如何定制一款12306抢票浏览器——处理预订页面和验证码自动识别功能

    具体的查找过程我这儿就不再赘述,我们通过代码来解读 BOOL CDeal12306WebPage::IsBookingPage( CComPtr<IHTMLDocument2> & spDoc, CComBSTR FALSE : TRUE; } HRESULT CDeal12306WebPage::GetTableQrTbody( CComPtr<IHTMLDocument2> & spDoc, CComPtr <IHTMLElement> & spElem ) { HRESULT hr = E_FAIL; do { CComPtr<IHTMLDocument2> spMainDoc 于是完整的预订流程是 HRESULT CDeal12306WebPage::BookTickets( CComPtr<IHTMLDocument2> & spDoc ) { HRESULT hr ConfirmOrd(spDoc))); } while (0); return hr; } HRESULT CDeal12306WebPage::ConfirmOrd( CComPtr<IHTMLDocument2

    1.1K40发布于 2019-01-16
  • 来自专栏ml

    C/C++ 如何来自动优雅的涮别银家的贴子

    spDispDoc; //从com组件中分离 184 spDispDoc = m_explo.get_Document(); //得到文档 185 CComQIPtr< IHTMLDocument2 IDispatch > sDDc; //从com组件中分离 2 sDDc = m_explo.get_Document(); //得到文档 3 CComQIPtr< IHTMLDocument2 接口 3 IHTMLDocument2 *spDoc = NULL; 4 if (! reinterpret_cast<void **>(&spDoc)); 7 else 8 { 9 ::MessageBox(this->GetSafeHwnd(),L"IHTMLDocument2 HRESULT hr; 2 IDispatch* lpDispatch; 3 lpDispatch = webclient.GetDocument(); 4 IHTMLDocument2

    1.4K50发布于 2018-03-26
  • 来自专栏MasiMaro 的技术博文

    使用MSHTML解析HTML页面

    在GUI程序中很容易就获取这个接口,获取它的方法很容易就可以在网上找到,在这主要说一下如何通过一段HTML字符串来生成对应的IHTMLDocument2接口。 使用CoCreateInstance创建一个接口,对于IHTMLDocument2接口一般是使用下面的语句: HRESULT hr = CoCreateInstance(CLSID_HTMLDocument 调用接口的write方法,将接口与HTML字符串绑定 经过这样几步就可以利用这个接口来访问HTML中的元素了,下面是它的详细代码: IHTMLDocument2* CreateIHTMLDocument2 (const string &strHtml) { IHTMLDocument2 *m_spDoc = NULL; HRESULT hr = CoCreateInstance(CLSID_HTMLDocument 它对应的代码如下: void EnumElements(IHTMLDocument2* m_spDoc) { CComPtr<IHTMLElementCollection> pCollec;

    4.3K30发布于 2018-08-31
  • 来自专栏全栈程序员必看

    delphi webbrowser 经常用法演示样例

    var Form : IHTMLFormElement ; D:IHTMLDocument2 ; begin with WebBrowser1 do begin D := Document as IHTMLDocument2; Form := D.Forms.item(

    91210编辑于 2022-07-12
  • 来自专栏微卡智享

    delphi提示“Undeclared identifier”的缺少引用单元列表

    Windows GetStdHandle Windows HDC Windows HFont Windows HINTERNET WinInet HKEY_CURRENT_USER Windows IHTMLDocument2

    2.7K20发布于 2019-07-25
  • 来自专栏方亮

    如何定制一款12306抢票浏览器——用户界面

    spWeb->get_Document(&dispDoc); CHECKHRPOINTER(hr, dispDoc); CComPtr<IHTMLDocument2 HRESULT CDeal12306WebPage::GetTrainNoPassengersInSettingPage( CComPtr<IHTMLDocument2> & spDoc, StTrainNoPassengerInfo bstrValue; } while (0); return hr; } HRESULT CDeal12306WebPage::GetTrainNoInSettingPage( CComPtr<IHTMLDocument2

    81930发布于 2019-01-16
  • 来自专栏landv

    社会单位消防安全户籍化管理系统——半自动提交V1.0版本

    WebBrowserNavigatedEventArgs e) 249 { 250 //自动点击弹出确认或弹出提示 251 252 IHTMLDocument2 vDocument = (IHTMLDocument2)webBrowser1.Document.DomDocument; 253 254 vDocument.parentWindow.execScript

    3.2K30发布于 2018-05-12
  • 来自专栏landv

    社会单位消防安全户籍化管理系统——半自动提交V1.0版本

    WebBrowserNavigatedEventArgs e) 249 { 250 //自动点击弹出确认或弹出提示 251 252 IHTMLDocument2 vDocument = (IHTMLDocument2)webBrowser1.Document.DomDocument; 253 254 vDocument.parentWindow.execScript

    1.2K20发布于 2018-06-22
  • 来自专栏方亮

    如何定制一款12306抢票浏览器——启动“人”线程

    CComBSTR bstrUrl; HRESULT hr = m_spWindow->get_LocationURL(&bstrUrl); CComPtr<IHTMLDocument2

    57410发布于 2019-01-16
领券