CHtmlView访问文件内部资源与innerHTML

时间:2007-08-15 17:46:40
【文件属性】:
文件名称:CHtmlView访问文件内部资源与innerHTML
文件大小:47KB
文件格式:RAR
更新时间:2007-08-15 17:46:40
综合系统类 CHtmlView访问文件内部资源与innerHTML演示代码例子...... 1、访问文件内部资源 void CInerHTMLView::OnRes() { // TODO: Add your command handler code here //--资源访问 CString s; s.Format("res://%s.exe/%d", ::AfxGetAppName(), IDR_HTML1); Navigate2(s); } 2、innerHTML操作内存中的HTML void CInerHTMLView::OnTest() { // TODO: Add your command handler code here CInternetSession session; //CStdioFile* file = session.OpenURL("http://127.0.0.1/"); CStdioFile* file = session.OpenURL("http://www.google.com/"); CString s = ""; if (file) { char buf[1024] = {0}; while (file->Read(buf, sizeof(buf)) > 0) s += buf; delete file; } ... }
【文件预览】:
代码中国.url
CHtmlView访问文件内部资源与innerHTML
----inerHTML.HTML(2KB)
----inerHTML()
--------res()
--------inerHTML.rc(11KB)
--------inerHTMLView.cpp(4KB)
--------inerHTML.dsp(5KB)
--------inerHTMLDoc.cpp(2KB)
--------inerHTMLView.h(2KB)
--------StdAfx.cpp(210B)
--------MainFrm.cpp(2KB)
--------resource.h(781B)
--------inerHTML.cpp(4KB)
--------MainFrm.h(1KB)
--------StdAfx.h(1KB)
--------inerHTML.h(1KB)
--------inerHTML.dsw(539B)
--------inerHTMLDoc.h(1KB)
--------inerHTML.clw(2KB)
--------ReadMe.txt(4KB)
----inerHTML.exe(64KB)
说明.htm
代码中国.txt

网友评论

  • 有帮助,谢谢。不过功能太简易了。
  • 访问文件内部资源? 没有效果啊