Windows 应用程序开发新手,需要一些建议
你好 我正在使用 C++ 在 windows7 上开始 Windows 应用程序开发。 (如果需要的话,也可以使用 C#/Java)。
现在想到的应用程序是一个窗口,有一个内部框架(类似于 iframe),在其中显示网页,并且使外部框架和内部框架能够通信(即网页将消息传递给外部框架)框架,可能由 JavaScript 实现,外部框架识别该消息并启动计算机的摄像头)。
会是这样的 http://html5demos.com/postmessage2 只不过外框是Windows应用程序而不是网页。 优选地,显示网页的内框架由web-kit提供支持。
我真的没有太多经验,所以我想知道这样的事情是否可能以及从哪里开始。 欢迎任何建议或资源。 提前致谢。
Hi
I'm starting windows application development on windows7 with C++. ( or C#/Java if necessary ).
The application in mind right now is a window that has a inner frame (kind like a iframe) displaying a web page in it, and to have the outer and inner frame be able to communicate ( ie. the webpage pass a message to the outer frame, possibly by JavaScript, and the outer frame recognize the message and starts the computer's camera ).
It would be something like this
http://html5demos.com/postmessage2
except that the outer frame is a windows application instead of a webpage.
Preferably, the inner frame displaying the web page is powered by web-kit.
I really don't have much experience so I was wondering if such thing is possible and where to start.
Any advice or resource is welcomed.
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我见过一些项目使用状态栏与嵌入式浏览器中的 Javascript 进行通信。
RichHtml4Eclipse就是这样一个项目;虽然不再处于开发阶段,但它展示了一般方法。具有结构化数据的事件是通过更改状态文本来引发的,外部的本机代码可以拾取并反序列化该状态文本。可以通过使用浏览器控件上提供的方法调用来在页面中的代码上调用Javascript方法。
我支持鼓励您避免使用 C++ 的评论。 Java 和 C# 都有 WebKit 绑定;根据我的经验,Java 在可移植性方面具有优势,但 C# / .NET 在开发 GUI 组件时提供了更轻松的体验。
I've seen projects use the status bar to communicate with Javascript in an embedded browser.
RichHtml4Eclipse is such a project ; while no longer in development, it demonstrates the general approach. Events with structured data are raised by changing the status text, which native code on the outside can pick up and deserialize. Javascript methods may be called on the code in the page by using the method calls provided on the browser control.
I would support the comment that encourages you to avoid C++. There are WebKit bindings for both Java and C# ; in my experience, Java has the edge in portability but C# / .NET makes for an easier experience when developing GUI components.
为什么不看看 Qt。它是跨平台的,附带 QtCreator - 一个不错的 IDE,并且可以轻松地与 WebKit 集成(事实上,WebKit是由KDE启动的,KDE是基于Qt的)。
Why don't you take a look at Qt. It is cross-platform, comes with QtCreator - a nice IDE, and can be easily integrated with WebKit (in fact, WebKit is started by KDE, which is based on Qt).
如果您运行的是 Windows 并且不关心可移植性,那么使用 .NET 可能会快得多。也许这篇文章会提供一些帮助使用。
If you're running Windows and aren't concerned with portability, using .NET could much quicker. Perhaps this article would be of some use.