salvadordf / WebView4Delphi

WebView4Delphi is an open source project created by Salvador Díaz Fau to embed Chromium-based browsers in applications made with Delphi or Lazarus/FPC for Windows.
https://www.briskbard.com/forum/
MIT License
280 stars 56 forks source link

Pixel per inch #29

Closed limelect closed 1 year ago

limelect commented 1 year ago

Screenshot - 14_10_2022 , 11_14_24 D10.2.3 On the tabbed Demo no pixel per inch for my Delphi I took off the property by hand from DFM's

Furthermore on windowlessbrowser demo on line 237 WVBrowser1.CreateWindowlessBrowser(FWVDirectCompositionHost.Handle) and

Result := CreateWindowlessBrowser(aHandle, GlobalWebView2Loader.Environment) I traced it to this point Result := FCoreWebView2Environment.BaseIntf

salvadordf commented 1 year ago

Hi,

Embarcadero adds more properties in every new version and I use Delphi 11.2 right now. To avoid these property issues just show the form in the IDE and save it.

According to the WebView2 API documentation creating the composition controller used in the WindowlessBrowser demo is only supported in Windows 11, Windows 10, Windows Server 2019 and Windows Server 2016. https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2environment3?view=webview2-1.0.1370.28#createcorewebview2compositioncontroller

I'll add a new error code text or a OS version check to avoid this issue in the future.

salvadordf commented 1 year ago

The latest version checks the Windows version before creating the composition controller.