如何编写IE,Firefox和Chrome网络浏览器插件 [英] How to write a web browser plugin for IE, Firefox and Chrome

查看:203
本文介绍了如何编写IE,Firefox和Chrome网络浏览器插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要编写一个支持IE 7+一个网络浏览器插件,火狐3 +,Chrome浏览器。

I need to write a web browser plugin that supports IE 7+, Firefox 3+, Chrome.

此插件有能够放置的DirectX对象在网页中的

This plugin has to be able to place a DirectX object in a web page.

我有插件没有经验。

我做了一些调查,并决定FireBreath做。

I did some investigating and decided to do it with FireBreath.


  1. 我不明白的地方插件区域内的图像的方式。有人可以提供的例子吗?

  1. I couldn't understand the way to place an image inside the plugin area. Can someone provide example?

我如何支持DirectX对象呢?任何例子吗?

How do I place a DirectX object there? Any example?

我如何触发自动安装?

谢谢!

萨拉

推荐答案

嗯,有你要解决两个问题。插件的理解是真的在这一点上比较容易的,因为有FireBreath来帮助你。天哪,谁写的一定是辉煌! (好吧,是我,所以我不得不说了吧)

Well, there are two problems you have to solve. Understanding of plugins is really the easier one at this point, since have FireBreath to help you. Gosh, whoever wrote that must have been brilliant! (okay, it was me, so I had to say it)

要了解的第一件事是,你不到位了的DirectX对象的任何地方。你不到位的图像插件里面。相反,你画的形象的一个窗口,就像在任何其他Windows应用程序。

The first thing to understand is that you don't "place" a "DirectX object" anywhere. You don't "place" an image inside the plugin. Rather, you draw the image to a window just like in any other windows application.

您可能希望我的回答拉起另一个类似的问题:<一href=\"http://stackoverflow.com/questions/6097069/directx-control-in-browser-plugin/6104141#6104141\">Directx在浏览器插件控制

You may want to pull up my answer to another similar question: Directx control in browser plugin

在Windows上正常的插件实例(一个窗口插件),你会得到你可以画上了HWND。您需要设置在该窗口中的DirectX环境并绘制它 - 或者在你的应用需求,或当RefreshEvent时逢帧率。如果按照链接你可以看到在窗口绘制一个链接上colonelpanic.net一个职位;应该帮助您更好地了解如何获得HWND。

In a normal plugin instance on windows (a "windowed" plugin) you will be given an HWND that you can draw to. You need to set up a DirectX context in that window and draw to it -- either at framerate that your application needs or just when a RefreshEvent comes. If you follow the link about you'll see a link to a post on colonelpanic.net on drawing in windows; that should help you understand better how you get the HWND.

图像基本上是相同的交易;如果你有图像数据,可以使用正常的Windows绘图API它画到HWND。

Images are basically the same deal; if you have image data, you can draw it to the HWND using normal windows drawing APIs.

最后,如果你需要额外的帮助,我强烈建议你跳进href=\"http://npapi.com/chat\"> FireBreath IRC聊天室的

Finally, if you need additional help I highly recommend you pop into the FireBreath IRC chat room. I'm usually around during daylight hours (GMT-0600) on weekdays and there are others who can sometimes help as well.

这篇关于如何编写IE,Firefox和Chrome网络浏览器插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆