C++调用JavaScript

时间:2015-04-21 10:34:59
【文件属性】:
文件名称:C++调用JavaScript
文件大小:46KB
文件格式:RAR
更新时间:2015-04-21 10:34:59
JavaScript Calls from C++ Sometimes, when we are using the IE Browser Control inside of a C++ application, we need to access the HTML elements. We can do it by using standard COM objects such as IWebBrowser2, IHTMLDocument2, and so forth. By doing this, we easily can implement features such as click button, click anchor, get input string, get HTML text, and so on. Unfortunately, Microsoft did not provide similar objects for JavaScript. In any case, it is possible to make a control for the JavaScript object inside an HTML page by using a traditional COM approach. This article describes the class CWebPage that allows you to do it and a technique to call a JavaScript function from C++ code Thanks:http://www.codeguru.com/ieprogram/JSCalls.html
【文件预览】:
JSCalls_demo
----JSCalls()
--------resource.h(1KB)
--------ChildFrm.cpp(4KB)
--------JSCall.dsw(537B)
--------WebPage.cpp(6KB)
--------JSCallView.h(2KB)
--------CallJScriptDlg.h(1KB)
--------JSCall.rc(14KB)
--------JSCallView.cpp(4KB)
--------NavigateBar.h(1KB)
--------JSCallDoc.h(2KB)
--------JSCall.opt(53KB)
--------ReadMe.txt(5KB)
--------LeftView.h(2KB)
--------res()
--------JSCall.dsp(5KB)
--------NavigateBar.cpp(2KB)
--------WebPage.h(2KB)
--------JSCall.ncb(65KB)
--------JSCallDoc.cpp(4KB)
--------MainFrm.h(2KB)
--------JSCall.clw(4KB)
--------JSCall.h(1KB)
--------StdAfx.cpp(208B)
--------JSCall.plg(3KB)
--------CallJScriptDlg.cpp(2KB)
--------ChildFrm.h(2KB)
--------MainFrm.cpp(3KB)
--------JSCall.cpp(5KB)
--------StdAfx.h(1KB)
--------LeftView.cpp(6KB)
JSCalls_src
----WebPage.cpp(6KB)
----WebPage.h(2KB)

网友评论

  • 还行 能用 谢谢了
  • 谢谢楼主,了解了调用原理,原来分发归类请求,就可以正常调用了
  • 没有说明,没有注释,没有演示,很难懂
  • 没法编译通过,VS2005, 很遗憾
  • 嗯~~ 还不错 不过有自动工具了貌似
  • 还行吧 看着很厉害 可惜我看不懂
  • 还行吧,不过不是我想要的,我想要是黑莓能使用的,可惜黑莓不能用com组件
  • 谢谢楼主,了解了调用原理,原来分发归类请求,就可以正常调用了