VC mshtml 如何加载本地html文件
我继承的是CHtmlView类,我知道使用Navigate2(url,NULL,NULL);pDoc2=(IHTMLDocument2*)GetHtmlDocument();就可以加载网页文件,可是这样网页就自动显示出来了,我不想让它显示,只是加载,请问该怎么做?
mshtml是解析用的吧,你这个好像是两回事,引用 mshtml是解析用的吧,你这个好像是两回事, 对啊,mshtml是解析用的,但是只有先加载上得到IHTMLDocument2接口才能进一步解析啊 如果只是解析,不需要用webbrowser http://www.codeguru.com/cpp/i-n/ieprogram/article.php/c4385/ C/C++ code: #include <windows.h> #include <mshtml.h> OLECHAR szHTML[] = OLESTR("<HTML><BODY>Hello World!</BODY></HTML>"); int __stdcall WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpCmdLine, int nShowCmd) { IHTMLDocument2 *pDoc = NULL; CoInitialize(NULL); CoCreateInstance(CLSID_HTMLDocument, NULL, CLSCTX_INPROC_SERVER, IID_IHTMLDocument2, (LPVOID *) &pDoc); if (pDoc) { IPersistStreamInit *pPersist = NULL; pDoc->QueryInterface(IID_IPersistStreamInit, (LPVOID *) &pPersist); if (pPersist) { IMarkupServices *pMS = NULL; p
相关问答:
select 下样表, <select name="us"> <option value="aa" selected>aa </option> & ......
JS的问题: JScript code: <script language="javascript"> function getDates() { document.getElementById("form1").tt_cc.value="我爱JS";
......
用vc 读取html文件怎么得到css里面定义的字体样式。比如我网页的一段代码为: <style type="text/css"> <!-- .STYLE7 {font-weight: bold; font-family: "宋体"; color: #F ......
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.IO; using Syst ......