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

The browser is not visible when vcl styles changed #51

Closed awenewa closed 6 months ago

awenewa commented 6 months ago

SimpleBrowser.zip

salvadordf commented 6 months ago

Hi,

When an application changes the VCL style it calls RecreateWnd which destroys the underlying Windows screen object, including any Chromium based browser (CEF or WebView2).

I'm not sure if reparenting the browser might be a possible solution for this problem. The safest solution would be to force an application restart when the user selects a different style.

awenewa commented 2 months ago

Thanks,It seems like a good solution.