wxWebView

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
wxwxwx
I live to help wx-kind
I live to help wx-kind
Posts: 180
Joined: Thu Dec 20, 2012 4:25 pm

wxWebView

Post by wxwxwx »

Hello,
i checked out wxWebView with wxWidgets 3.10 and wxWidgets 3.11.
It is far from what i see in edge, firefox or chrome. I use the bootstrap 4 in my webpages.

Is there a more browser similar alternative that can be used within the c++ wxWidgets universe ?
Or is there some trick to make this webview more browser compatible ?

example page:
https://getbootstrap.com/docs/4.0/examples/

Thank you
PB
Part Of The Furniture
Part Of The Furniture
Posts: 4193
Joined: Sun Jan 03, 2010 5:45 pm

Re: wxWebView

Post by PB »

What backend wxWebView uses is given by the platform.

E.g., on Windows, Internet Explorer is used, which maxes out on version 11 and also obviously depends on the version actually installed on the user's computer. If you are on MSW, I assume you set the compatibility mode as documented, to the value you need.

There is also a chromium backend in works, but it currently has some limitations...
User avatar
doublemax
Moderator
Moderator
Posts: 19114
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wxWebView

Post by doublemax »

I assume you're under Windows.

wxWebView uses Internet Explorer 7 by default. The best you can get is IE 11 by setting a registry entry. (This is a Windows limitation, not from wxWidgets).

Check this article:
https://docs.microsoft.com/en-us/previo ... _emulation

The webview sample from wxWidgets has this small piece of code for it:

Code: Select all

{
    wxLogNull nolog;   // suppress error messages
    wxRegKey rk( wxT("HKEY_CURRENT_USER\\Software\\Microsoft\\Internet Explorer\\Main\\FeatureControl\\FEATURE_BROWSER_EMULATION") );
    rk.SetValue( wxT("webview.exe"), 11001);
}
You must replace the name of the .exe with yours!

There is also a Chromium backend, but i don't know what its current state is.
Use the source, Luke!
wxwxwx
I live to help wx-kind
I live to help wx-kind
Posts: 180
Joined: Thu Dec 20, 2012 4:25 pm

Re: wxWebView

Post by wxwxwx »

I changed my code using the reg settings and in fact, it looks much closer to chrome etc.
For me at an acceptable state.

Many thanks to you both!
Post Reply