摘要:Cppwebbrowser->ExecWB(1,1);打开页面操作void __fastcall ExecWB(Shdocvw_tlb::OLECMDID cmdID, Shdocvw_tlb::OLECMDEXECOPT cmdexecopt, TVariant *pvaIn=TNoParam(), TVariant *pvaOut=TNoParam());typedef enum OLE...
阅读全文
随笔分类 - BCB-CppWebBrowser
摘要:Cppwebbrowser->ExecWB(1,1);打开页面操作void __fastcall ExecWB(Shdocvw_tlb::OLECMDID cmdID, Shdocvw_tlb::OLECMDEXECOPT cmdexecopt, TVariant *pvaIn=TNoParam(), TVariant *pvaOut=TNoParam());typedef enum OLE...
阅读全文
摘要:转载请注明出处http://www.cnblogs.com/missu/;HWND TForm_main::IEWEB(){ HWND hwndChild,hwndTmp;TOleControl * oleCtrl;char szClass[20];AnsiString aaaaa; oleCtrl=WB; hwndTmp=oleCtrl->Handle; while (true) { hw...
阅读全文
摘要:控件文件:system32\shdocvw.oca shdocvw.dll 注册:regsvr32 shdocvw.dll WebBrowser 是 IE 内核做的 VB 控件, WebBrowser.Document 为活动的文档返回自动化对象,引用 Microsoft HTML Object Library 可查看详细属性和方法 下面的解说假设窗体中有一个名称为 Web1 的 WebBrows...
阅读全文
摘要:如你所知, Internet Explorer像其他COM对象一样激发事件—通过连接点.但实际上Internet Explorer如何激发事件呢?每次 Internet Explorer需要向客户提供关于当前活动状态的信息, Internet Explorer 激发通过DWebBrowserEvents2 连接点激发一个事件. (之前到版本 4, Internet Explorer 通...
阅读全文
摘要:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--void__fastcallTForm1::CppWebBrowser1DocumentComplete(TObject*Sender,LPDISPATCHpDisp,Variant*URL){if(...
阅读全文
摘要:if(PostData!=NULL&&PostData->vt==(VT_VARIANT|VT_BYREF)&&PostData->pvarVal->vt!=VT_EMPTY) { *Cancel=VARIANT_TRUE; char *szTemp=NULL, *szPostData=NULL; long plLbound,plUbound; S...
阅读全文
摘要:void TForm1::Login(){ CppWebBrowser1->Quit(); IHTMLDocument2 *Htmldoc = NULL ; CppWebBrowser1->Document->QueryInterface(IID_IHTMLDocument2, (LPVOID*)&Htmldoc) ; IHTMLElementCollection *el...
阅读全文
摘要:AnsiString TForm1::WEB2HTMLCode(){ extern AnsiString str_CurrPath; AnsiString strCode; IHTMLDocument2 *HTMLDocument = NULL; if(SUCCEEDED(CppWebBrowser1->Document->QueryInterface(IID_IHTMLDocumen...
阅读全文
摘要:IHTMLDocument2 *spDoc = NULL; bool __stdcall CrnRunJavaScript(IHTMLDocument2 *spDoc, LPSTR lpScript, LPSTR lpLang = "JScript");bool __stdcall CrnRunJavaScript(IHTMLDocument2 *spDoc, LPSTR lpScript, LP...
阅读全文
摘要:void TForm1::ClickURL(AnsiString strURL) //登陆时{Variant disp,alllinks,eachlink;int linkcount;disp = CppWebBrowser1->Document;alllinks = disp.OlePropertyGet("links"); //取得所有的链接linkcount = alllinks.Ol...
阅读全文
摘要:void __fastcall TForm1::CppWebBrowser1NewWindow2(TObject *Sender, LPDISPATCH *ppDisp, VARIANT_BOOL *Cancel){ if (flag==true) { TForm1 *NewWindow = new TForm1(this); NewWindow->Visible=false; * ppDi...
阅读全文
摘要:CppWebBrowser1->Silent=true; //cppwebbrowser网页浏览 silent为true,屏蔽脚本提示错误CppWebBrowser1->Navigate(WideString(strLogin)); //打开网页,进入页面,cb6要加WideString,转换数据类型while(CppWebBrowser1->Busy)//判断网络状态CppWe...
阅读全文
|