在MFC中,如何在子对话框中的下拉组合框中获取鼠标悬停项 [英] In MFC, how to get mouse hover item in dropdown combobox in child dialog

查看:199
本文介绍了在MFC中,如何在子对话框中的下拉组合框中获取鼠标悬停项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





在MFC中,如何在儿童对话框中的下拉组合框中获取鼠标悬停项目



我尝试过:



如果对话框正在使用应用程序窗口,pretranslatemessage会处理组合框列表框的mousemove和mousehover消息,而如果对话框没有使用应用程序,他pretranslatemessage没有捕获组合框列表框的mousemove和mousehover消息。



是否有其他解决方案来处理我的要求?

Hi,

In MFC, how to get mouse hover item in dropdown combobox in child dialog

What I have tried:

If a dialog is using application window, the pretranslatemessage handles mousemove and mousehover messages for combobox's listbox whereas if the dialog is not using application he pretranslatemessage not captures the mousemove and mousehover messages for combobox's listbox.

Is there any other solution for handling my requirement?

推荐答案

正确的解决方案是使用 TrackMouseEvent 用于您的控制窗口。这个API有点受欢迎,并为控件设置了一些消息。必须每次都重新启用它。



突然间,我没有找到任何好的例子,但最好的是在此帖子的末尾
The correct solution is to use TrackMouseEvent for your control window. This API is a bit weired and sets up some messaging for the control. It must be re-enabled every time.

Suddenly I didnt found any nice example, but the best is at the end of this postings.


这篇关于在MFC中,如何在子对话框中的下拉组合框中获取鼠标悬停项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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