3
votes

I have a (parent) window in which a child-window is created by a another library (Ogre3d). Window initialization uses the bare Win32 API.

I'd like to capture the mouse input in my parent window, but it seems like I my WM_MOUSEMOVE events are received only by the child-window, which makes sense, since that fills all of my client-area.

Is there a way to capture the WM_MOUSEMOVE messages in the parent window or (unintrusively) redirect those messages from the child-window?

1
Using Spy++ can you verify that your parent window ever gets mouse messages? It seems like that it never would in this case.Chris O

1 Answers

4
votes

If you can obtain a handle to the window in question you can subclass it.

In a nutshell, you get to register a callback function that gets a crack at all of the messages sent to the sub-classed window.

The linked article should get you where you need to be.