Is there any tutorial on integrating CEF with wxWidgets

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.

Is there any tutorial on integrating CEF with wxWidgets

Postby chanwit » Wed Jan 26, 2011 10:32 am

Hi all,

I am looking for tutorials to help me start using wxWidgets with CEF.
Is there any CEF tutorial for this framework?

Regards,

Chanwit
chanwit
Newbie
 
Posts: 1
Joined: Wed Jan 26, 2011 10:25 am

Re: Is there any tutorial on integrating CEF with wxWidgets

Postby lodle » Tue Feb 08, 2011 9:35 pm

quite easy:

Make a new class inheriting from wxPanel and in the constructor do this:
Code: Select all

        CefWindowInfo winInfo;

   winInfo.m_dwStyle =  WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_TABSTOP;
   winInfo.m_nHeight = 500;
   winInfo.m_nWidth = 500;
   winInfo.m_windowName = cef_string_alloc(name);
   winInfo.m_hWndParent = (HWND)GetHWND();

   CefBrowser::CreateBrowser(winInfo, false, m_rEventHandler, defaultUrl);


Where m_rEventHandler is your event handler and defaultUrl is the url to load
lodle
Techie
 
Posts: 32
Joined: Tue Jun 01, 2010 4:36 am


Return to Support Forum

Who is online

Users browsing this forum: amaitland, Google [Bot] and 103 guests