当光标在非活动窗口中并且用户移动鼠标时触发该功能. [英] Function triggered when the cursor is in an inactive window and the user MOVES the mouse.

查看:175
本文介绍了当光标在非活动窗口中并且用户移动鼠标时触发该功能.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个带有1个内部CWnd窗口的CDialog窗口.

我将为对话框窗口实现非常类似的OnMouseActivate函数.

总结:

CWnd :: OnMouseActivate函数:
当光标位于非活动窗口(内部CWnd窗口)中并且用户按下鼠标按钮时,框架调用(在CDialog窗口中)此成员函数.

我想要的功能:
当光标位于非活动窗口(内部CWnd窗口)中并且用户移动鼠标 时,框架调用(在CDialog窗口中)此成员函数.
基本上,我想使内部CWnd窗口对于在整个CDialog窗口区域内发生的鼠标移动不可见".

我真的尽了一切,但我无法实现自己的目标.

我确定你可以提出一些好主意.

谢谢!

Sergio

I created a CDialog window with 1 inner CWnd window.

I would implement a very similar OnMouseActivate function for the dialog window.

In summary:

CWnd::OnMouseActivate function:
The framework calls (in CDialog window) this member function when the cursor is in an inactive window (inner CWnd window) and the user presses a mouse button.

My desired function:
The framework calls (in my CDialog window) this member function when the cursor is in an inactive window (inner CWnd window) and the user MOVES the mouse.
Basically, I want to make the inner CWnd window "invisible" to mouse movement occurring within total CDialog window area.

I really tried everything but I am not able to achieve my goal.

I''m sure you can make some good idea.

Thank you!

Sergio

推荐答案

看看此链接:
take a look at this link: http://blogs.msdn.com/b/oldnewthing/archive/2011/02/18/10131176.aspx[^] where WM_NCHITTEST is explained. Probably it will do the job for you...

Hope this helps...


这篇关于当光标在非活动窗口中并且用户移动鼠标时触发该功能.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆