如何判断菜单是否可见 [英] How to tell if menu is visible
本文介绍了如何判断菜单是否可见的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用user32.dll中的菜单功能,我希望可以通过语法确定当前菜单是否可见(换句话说,如果用户点击了下拉菜单或弹出菜单,并且当前与它进行交互?)
I am using the menu functions in user32.dll, and I am hoping it is possible to grammatically determine if a menu currently visible, (in other words, if the user has clicked on a dropdown or popup menu, and is currently interacting with it?)
推荐答案
我正在使用user32.dll中的菜单函数,我希望可以通过语法确定如果菜单当前可见,(换句话说,如果用户点击了下拉菜单或弹出菜单,并且当前正在与它进行交互?)
I am using the menu functions in user32.dll, and I am hoping it is possible to grammatically determine if a menu currently visible, (in other words, if the user has clicked on a dropdown or popup menu, and is currently interacting with it?)
窗口过程将收到
WM_INITMENU 和
WM_INITMENUPOPUP 。 当选择菜单项时,
WM_MENUSELECT
The window procedure will receive
WM_INITMENU and
WM_INITMENUPOPUP for menu interactions. And when a menu item is selected,
WM_MENUSELECT
这篇关于如何判断菜单是否可见的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文