HWND_TOPMOST

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.

HWND_TOPMOST

Postby ScottV » Tue Jul 22, 2014 1:47 pm

On Windows is there a way to get the HWND of the process that is rendering the HTML in order to move it to the top of the z-order?

In the Windows cef_client application when setting the window as the top most window the HTML select boxes do not show.

Code: Select all
   
case WM_CREATE: {
      // Create the single static handler class instance
      g_handler = new ClientHandler();
      g_handler->SetMainHwnd(hWnd);

      // set as top most
      SetWindowPos(hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW);


I have tried using the "browser->GetHost()->GetWindowHandle()" in the client_handler but this does not make a difference.

Code: Select all
void ClientHandler::OnAfterCreated(CefRefPtr<CefBrowser> browser) {
  REQUIRE_UI_THREAD();

  // set as top most
  HWND hWnd = browser->GetHost()->GetWindowHandle();
  SetWindowPos(hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW);


Example test page:
http://www.w3schools.com/tags/tryit.asp ... tml_select

This has been tested on Windows with the following CEF3 versions:
Windows 32bit 2014-07-18 CEF 3.2078.1780
Windows 32bit 2014-07-18 CEF 3.1916.1781
Windows 32bit 2014-07-18 CEF 3.1750.1738

--Scott
ScottV
Techie
 
Posts: 27
Joined: Thu Mar 27, 2014 1:22 pm

Re: HWND_TOPMOST

Postby magreenblatt » Tue Jul 29, 2014 9:41 am

magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: HWND_TOPMOST

Postby wildarmss » Mon Jun 06, 2016 3:42 pm

Hi

Has this issue been fixed either in chromium or CEF? I'm having an issue with the dropdowns not working when using TopMost in my container. I'm using CEF 3.2623.1401 (Chromium 49.0.2623.110)

Thanks
wildarmss
Newbie
 
Posts: 1
Joined: Mon Jun 06, 2016 3:36 pm


Return to Support Forum

Who is online

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