CEF3 tooltips not displaying

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.

CEF3 tooltips not displaying

Postby candaya » Mon May 11, 2015 12:54 pm

I have an html document with hyperlinks, I Chrome I can see the tooltips for these hyperlinks, but I cannot see them in my CEF browser. I am on windows 7 using CEF 3.1750.1738. I am unsure as to what off-screen rendering is, can someone tell me how I would know if I am using OSR? Beyond that, how are tooltips displayed in a CEF browser?

Thank you
candaya
Newbie
 
Posts: 4
Joined: Mon May 11, 2015 12:50 pm

Re: CEF3 tooltips not displaying

Postby magreenblatt » Mon May 11, 2015 1:05 pm

Off-screen rendering is when your application provides a CefRenderHandler and paints the bitmap itself via the OnPaint callback. When not using off-screen rendering tooltips should display without any additional work.
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: CEF3 tooltips not displaying

Postby candaya » Mon May 11, 2015 1:12 pm

I did a search and nothing came up for CefRenderHandler or *RenderHandler. This leads me to believe I am not using OSR. Any idea how to move forward?
candaya
Newbie
 
Posts: 4
Joined: Mon May 11, 2015 12:50 pm

Re: CEF3 tooltips not displaying

Postby magreenblatt » Mon May 11, 2015 1:32 pm

candaya wrote:I did a search and nothing came up for CefRenderHandler or *RenderHandler. This leads me to believe I am not using OSR. Any idea how to move forward?

You can try the cefclient sample application at the same version to see if the problem reproduces there. If it does, then try a newer version to see if it's been resolved.
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: CEF3 tooltips not displaying

Postby fasecero » Mon May 18, 2015 12:04 am

I had this same problem and I fixed it by including a manifest file to enable visual styles (like myapp.exe.manifest) and a call to InitCommonControlsEx function when my application start.

Code: Select all
   INITCOMMONCONTROLSEX icc;
   icc.dwSize=sizeof(INITCOMMONCONTROLSEX);
   icc.dwICC = ICC_STANDARD_CLASSES | ICC_LINK_CLASS | ICC_BAR_CLASSES;
   InitCommonControlsEx (&icc);


Application Manifests: https://msdn.microsoft.com/en-us/library/aa374191(v=vs.85).aspx
InitCommonControlsEx : https://msdn.microsoft.com/en-us/library/windows/desktop/bb775697%28v=vs.85%29.aspx
fasecero
Mentor
 
Posts: 60
Joined: Mon May 12, 2014 2:53 pm

Re: CEF3 tooltips not displaying

Postby candaya » Thu May 28, 2015 3:15 pm

fasecero,

Is there any way you could elaborate on how this is done. I have never done a manifest in c++.
candaya
Newbie
 
Posts: 4
Joined: Mon May 11, 2015 12:50 pm

Re: CEF3 tooltips not displaying

Postby fasecero » Thu May 28, 2015 4:37 pm

In cefclient folder is a file called "cefclient.exe.manifest". Copy that file to the same folder where your executable is located and rename it with the name of your application.

For example, if your application is called "browser.exe" then rename it as "browser.exe.manifiest". Tooltips needs that manifiest file to work properly.

Hope this help.
fasecero
Mentor
 
Posts: 60
Joined: Mon May 12, 2014 2:53 pm

Re: CEF3 tooltips not displaying

Postby candaya » Thu May 28, 2015 7:13 pm

Thank you so much for the help. Rather than do the manifest I wound up using a compiler directive in my applications main. The directive is:
#pragma comment(linker,"\"/manifestdependency:type='win32' \
name='Microsoft.Windows.Common-Controls' version='6.0.0.0' \
processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")

Which essentially does the same thing as the manifest.
Enabling Visual Styles: https://msdn.microsoft.com/en-us/librar ... 85%29.aspx
candaya
Newbie
 
Posts: 4
Joined: Mon May 11, 2015 12:50 pm

Re: CEF3 tooltips not displaying

Postby conshal » Thu Mar 12, 2020 12:03 am

So in this case, we need to generate an app.manifest for the project if you don't have. The way:

In Visual Studio 2010, 2012, 2013, 2015 and 2017 you can add the manifest file to your project. Right-click your project file on the Solution Explorer, select Add, then New item (or CTRL+SHIFT+A). There you can find Application Manifest File. The file name is app.manifest.

after app.manifest is generated uncomment this part containing Microsoft.Windows.Common-Controls:

<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
once done, build the project, you can see the HTML tooltips in your chromium embedded framework c# in a Winforms application.

I hope if anyone gets this issue, this can help them.
conshal
Newbie
 
Posts: 1
Joined: Tue Mar 10, 2020 7:04 am

Re: CEF3 tooltips not displaying

Postby Teste » Thu Apr 16, 2020 5:02 am

I'm not using OSR and was having this problem in Windows (in Mac, they strangely appeared). Generating the app.manifest did the trick. Thanks @conshal !

Now, I'm having a different problem. I need to intercept the OnTooltip call for formatting purposes, but the OnTooltip is never called in standard (non-osr) mode. I can see that this has been a problem since 2012 (https://bitbucket.org/chromiumembedded/ ... p-call-for) and I find it hard to believe that there isn't any solution or workaround yet.

The problem is that I'm passing html to the title and it is rendered like
Code: Select all
<b>This should be bold</b> <p>This should be a new paragraph</p>
instead of being formatted.
I want to be able to either:
a)Correctly intercept the OnTooltip and format the html in the tolltip
b)Disable the tooltips for both Windows and Mac somehow and provide my own tooltip component.

Anyone knows how can this be solved?
Teste
Newbie
 
Posts: 1
Joined: Tue Mar 31, 2020 6:49 am

Next

Return to Support Forum

Who is online

Users browsing this forum: No registered users and 43 guests