创建一个基于 MSHTML 的简约窗口
我有一个 Haskell 库,可以使用普通的 Web 应用程序,在本地服务器上运行它,然后使用 QtWebkit 打开一个显示该应用程序的窗口。 与 Qt 交互的代码非常短。然而,我想避免 Windows 用户的 Qt 开销。
看起来最好的方法是使用 Windows 上的 MSHTML 库来替代这个基于 QtWebkit 的 C++ 文件。不幸的是,我几乎没有使用 Windows 特定库的经验。看来我需要使用 IWebBrowser2 界面< /a>,但这似乎主要是推测性的。
如果有人能在这方面为我指明正确的方向,我将不胜感激。这里的最后一个技巧是它必须使用 MinGW 进行编译。不确定这种情况下有多少并发症。
谢谢
I have a library for Haskell that can take an ordinary web application, run it on a local server, and then open up a window displaying that application using QtWebkit. The code to interface with Qt is very short. However, I would like to avoid the Qt overhead for Windows users.
It seems like the best approach would be to have an alternative to this QtWebkit-based C++ file that instead uses the MSHTML library on Windows. Unfortunately, I have almost no experience with Windows-specific libraries. It seems like I need to use the IWebBrowser2 interface, but that seems mostly speculative.
If someone can point me in the right direction on this, I would be much obliged. The final trick here is that it has to compile with MinGW. Not sure how much of a complication that is in this case.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用 hdirect 从 Haskell 调用 IWebBrowser2 接口。针对 OLE/COM 进行编码很混乱,但它可以完成这项工作。将 C 绑定到接口是可能的,但如果您需要 MinGW,那么它实际上可能比纯粹的 Haskell 方法更难。
You can use hdirect to call the IWebBrowser2 interface from Haskell. It's messy to code against OLE/COM but it can do the job. Making a C binding to the interface is possible but if you need MinGW then it may actually be harder than a purely Haskell approach.