关于托盘的一个小问题

QQSEVEN 2003-08-21 08:12:11
我做了一个后台程序,运行起来如同“音量控制器”和“指法输入”一样
只在托盘处有一个图标,然后通过右键单击图标而显示一个PopMenu,可我如果
不在PopMenu上单击左键,PopMenum就一直存在(不能像“指法输入”可以通过
在其它出单击而让PopMenu消失)应该怎么处理呢?
...全文
79 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
QQSEVEN 2003-08-22
  • 打赏
  • 举报
回复
解决了。但是不是你的那种方法。

其实,只要在rackPopupMenu(……)前加上SetForegroundWindow()

就可以了。
nicepose 2003-08-21
  • 打赏
  • 举报
回复
case WM_NOTIFYICON: //当对任务栏的图标操作时windows发送WM_NOTIFYICON消息
uID=wParam;//图标的ID值
uMsg=lParam;//用户对任务栏图标进行的是什么操作
if(uID==ID_NOTIFYICON)
{
switch(uMsg)
{
case WM_RBUTTONUP://如果是单击右键
GetCursorPos(&point);//获得单击的坐标位置
TrackPopupMenuEx(htaskmenu,TPM_VERTICAL|TPM_LEFTALIGN,point.x,point.y,hwnd,NULL);//在单击的位置上显示弹出菜单
break;

case WM_LBUTTONDBLCLK:
ShowWindow(hwnd,1);//恢复窗口
IsBegin=FALSE;//关机标志设为FALSE
Shell_NotifyIcon(NIM_DELETE,&nid);//删除图标
break;
}
}
return 0;


这个是基本的过程
这样写就不会出现你的问题了
QQSEVEN 2003-08-21
  • 打赏
  • 举报
回复
看来我没说明白:

是这样的:我把POpMenu点出来后,如果不对PopMenu上的菜单进行操作,则

PopMenu就一直存在。我要解决的是这个问题。
QQSEVEN 2003-08-21
  • 打赏
  • 举报
回复
试试先,可以就给分!
网络上流传的都是3.0的破解版,使用中还有些小问题,不太好用,这个是我自己整理的,使用的是3.2的内核,和优化过的汉化语言包,没有3.0的使用bug。 解压缩即可运行,已注册。 PS Tray Factory The system tray icons management utility Current version: 3.2 OS: Windows 7/Vista/XP/2K/9X/NT (32 and 64 bit) License: Try-before-you-buy Cost: $24.95 PS Tray Factory is a powerful and handy tool meant to flexibly control ALL the other icons in the system tray of the taskbar. PS Tray Factory will help you to manage all the applications that place their icons in the taskbar tray. When you have installed PS Tray Factory, you will forget about the problem of lack of space in the system tray, and will also get an easy, fast and handy tool to handle those applications. In short, ALL Windows users will get this handy and powerful tool at their disposal, whereas only Windows XP users have an idea of it. For the latter, we have made a nice surprise, as the features of PS Tray Factory exceed the standard built-in ones of this OS. With PS Tray Factory you can quickly hide system tray icons and easy manage them. PS托盘工厂 系统托盘图标的管理程序 当前版本:3.2 操作系统:Windows 7 / Vista / XP / 2 K / 9 X / NT(32位和64位) 许可:起来 费用:$ 24.95 PS托盘工厂是一个强大而灵活方便的工具旨在控制其他所有图标在任务栏的系统托盘。PS托盘工厂将帮助您管理的所有应用程序把他们的图标在任务栏上托盘。当你已经安装了PS托盘工厂,你会忘记这个问题缺乏空间在系统托盘中,也将得到一个简单、快速和方便的工具来处理那些应用程序。简而言之,所有的Windows用户将得到这个方便的和强大的工具可供选择,而只有Windows XP用户有一个想法。对于后者,我们已经有了一个美好的惊喜,因为功能PS的托盘工厂超过标准的内置函数的操作系统。与PS托盘工厂可以快速隐藏系统托盘图标和容易管理它们。 网络上流传的都是3.0的破解版,使用中还有些小问题,不太好用,这个是我自己整理的,使用的是3.2的内核,和优化过的汉化语言包,没有3.0的使用bug。 解压缩即可运行,已注册。
-------------------------------------------------------------------------------- 飞鸽传书 (IP Messenger) Ver2.06 Copyright (C) 1996-2004 SHIROUZU Hiroaki All Rights Reserved. -------------------------------------------------------------------------------- 目录: 1. 软件简介 2. 许可协议 3. 系统要求 4. 使用说明 5. 相关信息 6. 广域网设置(广播设置) 7. 补充 8. 支持 9. 更新历史 10. 感谢 ================================================================================ 重要说明: comctl32.dll(公共控件) 要求 4.71 或以上版本 更多信息请参见 "系统要求" ================================================================================ -------------------------------------------------------------------------------- 1. 软件简介 - IPMsg 是一款局域网内即时通信软件, 基于 TCP/IP(UDP). 可运行于多种操作平台(Win/Mac/UNIX/Java), 并实现跨平台信息交流. - 不需要服务器支持. - 支持文件/文件夹的传送 (2.00版以上) - 通讯数据采用 RSA/Blofish 加密 (2.00版以上) - 十分小巧, 简单易用, 而且你可以完全免费使用它 - 目前已有的版本包括: Win32, Win16, MacOS, MacOSX, X11, GTK, GNOME, Java 等, 并且公开源代码. 请查看以下地址以获得相关信息: http://www.ipmsg.org/ -------------------------------------------------------------------------------- 2. 许可协议 (BSD License) Copyright (c) 1996-2004 SHIROUZU Hiroaki All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of the SHIROUZU Hiroaki nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRI

2,640

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 硬件/系统
社区管理员
  • 硬件/系统社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧