С++对话窗口,当光标悬停在按钮上方时,会发生什么事件? [英] С++ Dialog Window , What event is going when my cursor is over the button?

查看:103
本文介绍了С++对话窗口,当光标悬停在按钮上方时,会发生什么事件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当鼠标光标悬停在按钮(或其他控件)上时,如何处理事件?

How to do handler for event, when the mouse cursor is over the button (or some other control) ?

推荐答案

WM_MOUSEMOVE [ ^ ]吗?


此消息是否要进行编辑控制?

(现在我可以只处理表格-> CDlg :: OnMouseMove()的处理程序)


看,我有1个按钮和1个StatusBar.

我的程序必须提供:

如果我将光标放在按钮上,那么StatusBar会向我显示一些文本.
如果光标不在按钮上方,则StatusBar为空.

您能给我示例代码吗?
this message FOR EDIT CONTROL?

(now I can do just handler for form -> CDlg::OnMouseMove())


look, I have 1 button, and 1 StatusBar.

my programm must to provide:

If I have cursor over the button then StatusBar show me some text.
If cursor is not over the button then StatusBar is empty.

Can you give me for example code, please?


检查文档以获取
Check the documentation for WM_MOUSEMOVE[^] to see what details you can capture. From that you should be able to check where it is on your dialog, and from that information you can decide what message to display in your status bar.


这篇关于С++对话窗口,当光标悬停在按钮上方时,会发生什么事件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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