联盟首页 协同开发 共创软件 开放源码 软件工程 共创论坛 关于联盟
  您的位置 » 开放源码库【成熟 - 项目摘要 首页 | 分类源码 | 提交源码 | 下载统计 | 原创源码 | 成熟源码 | 代码片断
 
 JavaScript Calls from C++ - 项目摘要
摘要 | 管理 | 论坛
文档 | 软件包

源码库中源码数量为19221
有贡献人员名单:

-= 更多 =-
  • ffdshow
  • jasperreports
  • PoolMan
  • Air Traffic Controller
  • virtualdub-win
  • CppUnit
  • Apache-SSL-Jserv
  • FCK editor
  • Async Professional
  • GLgraph
  • -= 更多 =-

    项目描述:
    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.

    有时,当我们在一人C++程序中使用IE Browser Control控件时,我们需要访问HTML 元素。我们可以通过共享COM对象,如IWebBrowser2, IHTMLDocument2 等等,来实现。这样,我们可以容易地实现点击按钮、超链接功能,获取输入的字符串,得到HTML 文本,等等。不幸的是,Microsoft 没有提供JavaScript的对应模型。在这种情况下,我们可以使用传统的COM方法为HTML 中的JavaScript 生成一个控件。这个项目中的CWebPage 类就可以让你完成这一功能,演示了从C++代码中调用JavaScript 的技术。
    来源: http://www.codeguru.com/ieprogram/JSCalls.html
    类别:
    发布者: cbd002

    最新发布源码包
    软件包 版本号 日期 本地下载
    JSCalls  1.0  2004-04-19 下载

    原始下载连接(国外) http://www.codeguru.com/code/legacy/ieprogram/JSCalls_demo.zip

      » 合 作 伙 伴