UI is mess when drag a window on browser

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.

UI is mess when drag a window on browser

Postby qiangqiang » Tue Jun 28, 2016 5:23 am

Hi Expert

I create an win form application with Win API.
Please see attachment.
The outer red box is a child MDI window of application client, and I create a browser on this window.
And the inner box is another MDI child window. These two windows are siblings.

The issue is when I press left mouse to drag the inner window, the result page is in mess.
But when I release the mouse, the repeated 'shadow' on drag path are gone and everything is OK.

Both the two window style are set with WS_CLIPCHILDREN & ws_clipsiblings.

Any ideas?

UI.png
UI.png (51.69 KiB) Viewed 4267 times
qiangqiang
Techie
 
Posts: 13
Joined: Mon Jun 20, 2016 4:48 am

Re: UI is mess when drag a window on browser

Postby magreenblatt » Tue Jul 05, 2016 10:20 am

What Windows version and CEF version? What Windows theme are you using?
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: UI is mess when drag a window on browser

Postby qiangqiang » Tue Jul 05, 2016 9:40 pm

Hi

I use Win7 SP1 and the theme is the default Aero themes 'windows 7'

I test with latest CEF build 3.2704, and looks the issue still exists.

Thanks
qiangqiang
Techie
 
Posts: 13
Joined: Mon Jun 20, 2016 4:48 am

Re: UI is mess when drag a window on browser

Postby qiangqiang » Wed Jul 06, 2016 3:32 am

I embbed the CEF message loop like this

Code: Select all
   while (GetMessage(&msg, NULL, 0, 0))
   {
      static int k = 0;
      TCHAR temp[100];
      wsprintf(temp, L"%d run...\n", k);
      k++;
      OutputDebugString(temp);
      if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg))
      {
         TranslateMessage(&msg);
         DispatchMessage(&msg);
      }         
         try
         {

            CefDoMessageLoopWork();
         }
         catch (...)
         {
         }

   }


so it looks when the mouse is pressed, the win api GetMessage will block ...
If I want to use the CEF meesage loop like this, how shall I do ?
qiangqiang
Techie
 
Posts: 13
Joined: Mon Jun 20, 2016 4:48 am

Re: UI is mess when drag a window on browser

Postby qiangqiang » Wed Jul 06, 2016 4:08 am

Some correction,

when I left click mouse and choose the inner window, and drag
the DispatchMessage will block.

One way I can imagine is to add a SetTimer to call CefDoMessageLoopWork .

But I think its very tircky.
qiangqiang
Techie
 
Posts: 13
Joined: Mon Jun 20, 2016 4:48 am


Return to Support Forum

Who is online

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