鼠标悬停即可选择mfc上下文菜单项 [英] mfc context menu items get selected on mouse over

查看:147
本文介绍了鼠标悬停即可选择mfc上下文菜单项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有上下文菜单的应用程序.我使用OnMenuSelect方法,但是当鼠标悬停在菜单项上时会调用它,而不是在单击它时调用它.

I have an application with a context menu. I use the OnMenuSelect method but it gets invoked when mouse is over the menu item, not when I click on it. Is there a method to solve this problem?

推荐答案

这是OnMenuSelect方法的正确行为.例如,请参见在C ++部分中使用MFC" 2:菜单" [
This is the correct beahaviour of the OnMenuSelect method. See, for instance, "Using MFC in C++ Part 2: Menus"[^] on how to handle the item click event.


这篇关于鼠标悬停即可选择mfc上下文菜单项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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