开发者

Capturing WM_MOUSEMOVE events in parent window

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?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜