Passing new URL to already running CEF application

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.

Passing new URL to already running CEF application

Postby tashimaya » Tue Nov 25, 2014 9:00 am

I'm running cefsimple on Window 8.

I have registered a custom URL like this:

Code: Select all
HKEY_CLASSES_ROOT
      (Default) = "URL:CefSimple Protocol"
      URL Protocol = ""
      DefaultIcon
         (Default) = "cefsimple.exe,1"
      shell
         open
            command
               (Default) = "C:\Program Files\MyApp\cefsimple.exe" -url "%1"


<a href="cefsimple://bbc.co.uk">Go to BBC</a> // Link 1
<a href="cefsimple://google.co.uk">Go to Google</a> // Link 2

Clicking on Link 1 launches cefsimple.exe and it navigates to BBC fine. When I click on Link 2 I find the existing cefsimple window handle so that there is only one instance of cefsimple. This is working fine. What I would like to do is to navigate to google in the existing cefsimple window. How can I pass a new URL to already running CEF application and let it navigate to the new URL?

Many thanks
tashimaya
Techie
 
Posts: 36
Joined: Fri Oct 10, 2014 7:18 am

Re: Passing new URL to already running CEF application

Postby magreenblatt » Tue Nov 25, 2014 12:15 pm

tashimaya wrote:How can I pass a new URL to already running CEF application and let it navigate to the new URL?

You can use WM_COPYDATA on Windows. See http://bcbjournal.org/articles/vol3/991 ... ations.htm for related discussion.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Passing new URL to already running CEF application

Postby tashimaya » Tue Nov 25, 2014 12:25 pm

Thanks for the info!!
tashimaya
Techie
 
Posts: 36
Joined: Fri Oct 10, 2014 7:18 am


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 89 guests