在 Delphi/C++ Builder 中使用 WebView (EdgeHTML) [英] Using WebView (EdgeHTML) in Delphi / C++ Builder

查看:75
本文介绍了在 Delphi/C++ Builder 中使用 WebView (EdgeHTML)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是否正确理解 EdgeHTML 现在可用于 Windows 10 中的桌面(Win32/Win64 应用程序)?根据这些博客文章:

https://blogs.windows.com/msedgedev/2018/05/09/modern-webview-winforms-wpf-apps/https://blogs.windows.com/msedgedev/2018/10/04/edgehtml-18-october-2018-update/https://docs.microsoft.com/en-us/windows/communitytoolkit/controls/wpf-winforms/webview

看来,微软已经为 Windows 桌面 (Win32) 应用添加了 EdgeHTML WebViewControl,但到目前为止,该应用还无法用于桌面应用(只有基于 Trident 的 MSHTML 控件可用于桌面应用).

如果这是真的,是否有可能在 Delphi/C++ Builder 中使用它,或者我们是否必须等待 RAD Studio 的新更新中的新 TWebView 控件?如果可能 - 是否有任何代码示例可以查看(C++ Builder 或 Delphi)?.NET 的要求是否意味着它不能在 RAD Studio 生产的常规 Win32/Win64 应用程序中使用?

解决方案

RAD Studio 10.4 Sydney 增强了对 Microsoft 新推出的基于 Chromium 的 Edge 浏览器的支持.

有两个新控件 TEdgeBrowser 可用于直接使用 Edge 浏览器引擎以及允许经典 TWebBrowser 控件在新的 Edge 渲染引擎通过 TWebBrowser.SelectedEngine 属性.>

Embarcadero 在这篇博客文章中的详细解释:

Am I understanding correctly that EdgeHTML is now available to desktop (Win32/Win64 applications) now in Windows 10? According to these blog posts:

https://blogs.windows.com/msedgedev/2018/05/09/modern-webview-winforms-wpf-apps/ https://blogs.windows.com/msedgedev/2018/10/04/edgehtml-18-october-2018-update/ https://docs.microsoft.com/en-us/windows/communitytoolkit/controls/wpf-winforms/webview

It appears that Microsoft has added EdgeHTML WebViewControl for Windows desktop (Win32) apps which hasn't been available for desktop apps so far (only Trident based MSHTML control was available for desktop apps).

If this is true, is there a possibility to utilize this in Delphi/C++ Builder or do we have to wait for a new TWebView control in the new update of RAD Studio? If possible - are there any code samples to look at (C++ Builder or Delphi that is)? And does the requirement of .NET means it can't be utilized in regular Win32/Win64 app as produced by RAD Studio?

解决方案

RAD Studio 10.4 Sydney comes with enhanced support for the new Chromium-based Edge browser by Microsoft.

There is both a new Control TEdgeBrowser that can be used to use the Edge browser engine directly as well as the possibility to allow the classic TWebBrowser control to use the new Edge rendering engine automatically when it is available via the TWebBrowser.SelectedEngine property.

Detailed explanation in this blog entry by Embarcadero:

这篇关于在 Delphi/C++ Builder 中使用 WebView (EdgeHTML)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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