让托盘弹出菜单失去焦点时自动消失
2011-07-30 11:45
176 查看
转自: http://www.slyar.com/blog/tray-menu-exit.html
托盘弹出控制菜单后,单击其他地方或者按ESC键不能使托盘菜单消失,必须选择托盘菜单里的控制选项才能关闭菜单...很纠结的一个问题。
查了好久,终于在MSDN上找到答案,不过这答案让我很想杀了微软的设计人员...
135788:Menus for Notification Icons Do Not Work Correctly
SYMPTOMS:When you display a context menu for a notification icon, clicking anywhere besides the menu or the window that created the menu doesn't cause the menu to disappear.
RESOLUTION:To correct the first behavior, you need to make the current window the foreground window before calling TrackPopupMenu or TrackPopupMenuEx.
修正办法就是将SetForegroundWindow()放在pSubMenu->TrackPopupMenu()前面,这样就使得当前窗口变为前置了。
STATUS:This behavior is by design. //TNND,居然告诉我设计就是这样的,设计个锤子...
托盘弹出控制菜单后,单击其他地方或者按ESC键不能使托盘菜单消失,必须选择托盘菜单里的控制选项才能关闭菜单...很纠结的一个问题。
查了好久,终于在MSDN上找到答案,不过这答案让我很想杀了微软的设计人员...
135788:Menus for Notification Icons Do Not Work Correctly
SYMPTOMS:When you display a context menu for a notification icon, clicking anywhere besides the menu or the window that created the menu doesn't cause the menu to disappear.
RESOLUTION:To correct the first behavior, you need to make the current window the foreground window before calling TrackPopupMenu or TrackPopupMenuEx.
修正办法就是将SetForegroundWindow()放在pSubMenu->TrackPopupMenu()前面,这样就使得当前窗口变为前置了。
STATUS:This behavior is by design. //TNND,居然告诉我设计就是这样的,设计个锤子...
相关文章推荐
- 让托盘弹出菜单失去焦点时自动消失
- MFC让系统托盘菜单失去焦点时自动消失
- MFC让托盘弹出菜单失去焦点自动关闭
- C# TreeView树控件,失去焦点仍然高亮显示,右击节点时才弹出右键菜单,空白处右击不弹出菜单
- 【小技巧】让Android EditText失去焦点,防止自动弹出键盘
- Android 让EditText失去焦点避免自动弹出输入法
- Android 让EditText失去焦点避免自动弹出输入法
- Android 让EditText失去焦点避免自动弹出输入法
- 当弹出的div失去焦点的时候自动隐藏
- 在tableview中选种一行,当失去焦点的时候选种行的颜色自动消失
- 托盘图标菜单弹出后,点击其它地方,菜单不消失的问题
- 今天论坛中遇到的两则问题说明(COM库的初始化问题以及托盘图标弹出菜单不消失问题)
- 鼠标悬浮到表格的单元格上,将弹出一个框,框中显示这个单元格的内容。框失去焦点,框也消失。利用jQuery+javascript写的。
- 系统托盘图标显示菜单(TrackPopupMenu)无法自动消失解决方法
- 【转】EditText获取焦点不自动弹出键盘设置--失去焦点的方法,不错
- Android 让EditText失去焦点避免自动弹出输入法
- Android 中使 EditText 失去焦点,禁止弹出软键盘,及 弹出软键盘后 EditText 自动上移 不致被遮挡
- C# TreeView树控件,失去焦点仍然高亮显示,右击节点时才弹出右键菜单,空白处右击不弹出菜单
- 鼠标悬浮到表格的单元格上,将弹出一个框,框中显示这个单元格的内容。框失去焦点,框也消失。利用jQuery+javascript写的。
- jQuery实现文本域内提示文字,当鼠标点击进文本域后自动消失,文本域失去鼠标焦点后显示提示文字或显示用户输入的文字。