Creating message window in multi-threaded message loop mode

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.

Creating message window in multi-threaded message loop mode

Postby Baxter15 » Tue Jun 14, 2016 10:05 am

We have to run in multi-threaded message mode due to floating point settings in our app. Because of this, we are not getting accelerator keys and other UI events when the browser window has focus. These DO work if we are not running in multi-threaded mode.

I read that in order to get the messages on the main app's UI thread we can create a hidden window for message processing. I have used the example in cefclient. I call CreateMessageWindow(m_hInstance) where n_hInstance is the instance of the CWinApp. CreateMesaageWindow() and MessageWndProc() are defined exactly as in cefclient.

My problem is that MessageWndProc is not getting called for UI events in the browser. For example, when the browser has focus, selecting Alt-F does not display the File menu.
Baxter15
Techie
 
Posts: 18
Joined: Thu Jul 16, 2015 8:51 am

Re: Creating message window in multi-threaded message loop m

Postby magreenblatt » Tue Jun 14, 2016 10:59 am

When I run `cefclient.exe --multi-threaded-message-loop` selecting Alt-F displays the File menu for me.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Creating message window in multi-threaded message loop m

Postby Baxter15 » Tue Jun 14, 2016 11:50 am

I would expect that the sample application would work correctly so I'm wondering if there are any hints as to what to look for to determine why my application is not working? For example, do I need to send out a message from the ClientHandler when a keypress or scrollwheel event is captured in order for the MessageWndProc to be called?
Baxter15
Techie
 
Posts: 18
Joined: Thu Jul 16, 2015 8:51 am

Re: Creating message window in multi-threaded message loop m

Postby magreenblatt » Tue Jun 14, 2016 12:09 pm

Are you implementing CefKeyboardHandler methods? Any unhandled keyboard/character messages are sent to DefWindowProc.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Creating message window in multi-threaded message loop m

Postby Baxter15 » Mon Jun 20, 2016 7:54 am

Basically what we need is a way to load the application's accelerator table so that we can get scrollwheel events and keyboard shortcuts, etc.
Baxter15
Techie
 
Posts: 18
Joined: Thu Jul 16, 2015 8:51 am


Return to Support Forum

Who is online

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