Click event and loading html page from dll.

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.

Click event and loading html page from dll.

Postby surbhijain » Tue Aug 25, 2015 4:11 am

Hi,

I am integrating CEF with my application to give it a html based UI.
I am using visual studio 2008 and implementing my application in c++.
I got stuck in two problems while working on this.

1. How can I get mouse click event from HTML page to back end (c++).
I want to handle the functioning of every control of the HTML page in c++.

2.How can I load HTML page which is present in a dll ?
I have tried res protocol but it is not working.

Thank you.
surbhijain
Newbie
 
Posts: 1
Joined: Tue Aug 25, 2015 4:02 am

Re: Click event and loading html page from dll.

Postby magreenblatt » Tue Aug 25, 2015 8:59 am

surbhijain wrote:1. How can I get mouse click event from HTML page to back end (c++).
I want to handle the functioning of every control of the HTML page in c++.

You will need to use a mix of JavaScript and C++. For example, give the button an onClick listener that calls a bound C++ function. See the JavaScriptIntegration wiki page.

surbhijain wrote:2.How can I load HTML page which is present in a dll ?

This is demonstrated in the cefclient sample application. Search for IDS_BINDING or similar in the code. You will need to use the DLL module handle instead of the application module handle when loading the resource.
magreenblatt
Site Admin
 
Posts: 12383
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 41 guests