which C++ UI framework is suited to bind CEF

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

which C++ UI framework is suited to bind CEF

Postby clever101 » Wed Oct 10, 2018 1:16 am

now I am developing a software need to bind CEF on windows. I need to choose a C++ UI framework. there are some choices as follow:

MFC: I am familiar with it.

QT: I am also familiar with it.

native Win32 API: I guess code will be more.

WTL: not familiar with it.

duilib: not familiar with it.

which one is best ?
clever101
Newbie
 
Posts: 8
Joined: Mon Sep 17, 2018 9:55 pm

Re: which C++ UI framework is suited to bind CEF

Postby Czarek » Wed Oct 10, 2018 1:49 am

The cefclient/cefsimple sample application that are bundled with CEF are written using native win32 apis. The CEF project supports only cefclient/cefsimple applications. If there are bugs and they can be reproduced in these examples they are likely to be fixed in CEF. The cefclient example has lots of features, but its code is complex. The cefclient example also supports CEF Views (run with the --use-views flag), which is a high level UI framework within CEF that makes managing windows easier and supports a few widgets. CEF Views support only Windows/Linux platforms, see its API here: https://github.com/chromiumembedded/cef ... lude/views .

For qt examples see:
1. https://github.com/tishion/QCefView
2. https://github.com/linuxdeepin/qcef
3. https://github.com/hiitiger/QtCef
4. https://github.com/kuscsik/qtcefsample
5. https://github.com/GreatTux/CefMinGWQt
6. https://github.com/vladon/QtCefExample
7. https://github.com/XuShaohua/qcef
8. https://github.com/rekols/QCefDemo
9. https://github.com/Dax89/QtCEF

There is an MFC example circulating somewhere here on the CEF Forum, you can look for it.
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am

Re: which C++ UI framework is suited to bind CEF

Postby ndesktop » Wed Oct 10, 2018 5:00 am

The MFC example (if it's the one asked yesterday) is CEF-1 based. (Or maybe is another using CEF3).
WTL does not really offers much that can't be written in a relative short time.
Best best would be Win32 API IMHO.
ndesktop
Master
 
Posts: 756
Joined: Thu Dec 03, 2015 10:10 am

Re: which C++ UI framework is suited to bind CEF

Postby HarmlessDave » Wed Oct 10, 2018 11:20 am

Win32 will probably be easier to use than MFC since the document-view framework is not a good fit and its re-working of message handling could make things harder instead of easier.
HarmlessDave
Expert
 
Posts: 370
Joined: Fri Jul 11, 2014 2:02 pm

Re: which C++ UI framework is suited to bind CEF

Postby magreenblatt » Wed Oct 10, 2018 12:37 pm

Is using c++ a strong requirement? If not, you might want to look at the .Net wrappers (CefSharp, CefGlue) which can simplify application development that targets only the Windows platform.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: which C++ UI framework is suited to bind CEF

Postby ndesktop » Wed Oct 10, 2018 1:56 pm

I'm not sure they simplify development that much. Some plumbing code from .NET does make life easier concerning pointers and maybe lifetimes, but other than that...
But no, C/C++ is not a requirement. Any language that can call C code and make a message loop can be used.
ndesktop
Master
 
Posts: 756
Joined: Thu Dec 03, 2015 10:10 am

Re: which C++ UI framework is suited to bind CEF

Postby magreenblatt » Wed Oct 10, 2018 2:06 pm

ndesktop wrote:But no, C/C++ is not a requirement. Any language that can call C code and make a message loop can be used.

I was asking the original poster about their particular project requirements ;)
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: which C++ UI framework is suited to bind CEF

Postby ndesktop » Wed Oct 10, 2018 2:46 pm

Sorry about that. I might have stepped over the requirement 7 - "Recognize when is the time to go home".
ndesktop
Master
 
Posts: 756
Joined: Thu Dec 03, 2015 10:10 am

Re: which C++ UI framework is suited to bind CEF

Postby salvadordf » Wed Oct 10, 2018 3:02 pm

If c++ is not a strong requirement you can also use JCEF (Java), CEFPython (Python), fpCEF3 (FreePascal) or CEF4Delphi (Delphi and FreePascal). :D

See the "External Projects" section in this page for all the links :
https://bitbucket.org/chromiumembedded/cef
Maintainer of the CEF4Delphi, WebView4Delphi, WebUI4Delphi and WebUI4CSharp projects.
User avatar
salvadordf
Expert
 
Posts: 129
Joined: Sun Dec 18, 2016 8:39 am
Location: Spain

Re: which C++ UI framework is suited to bind CEF

Postby mohamedm » Sat Oct 20, 2018 4:24 pm

We have been using wxWidgets and it's working very well. It's cross platform, and it's licensing requirements for commercial applications are more friendly.

I've used this as a starting point for the binding https://github.com/sjlamerton/wxWebViewChromium, but many changes and restructuring was required to use it robustly. After that though, it's remained virtually untouched.

Our UI is entirely in HTML though, so the wxWidgets part is essentially a window with a single web view inside.
mohamedm
Techie
 
Posts: 18
Joined: Mon Oct 16, 2017 3:25 am

Next

Return to Support Forum

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot] and 97 guests