首页
社区
课程
招聘
[求助]关于explorer出错系统托盘的问题
发表于: 2006-8-8 19:43 4334

[求助]关于explorer出错系统托盘的问题

2006-8-8 19:43
4334
这里高人较多,问一个非PJ的问题,希望能得到指教,
大家也许碰到过explorer.exe出错而关闭的情况,没关系,系统会重新启动这个shell,现在问题是原来在系统托盘的一些东东(比如aa)不见了,只有"音量小喇叭","网络连接"能复生,foxmail也可以,但其实aa的进程还在,但现在没办法调出他的窗口来,请问foxmail等是如何实现重开explorer时也能显示在系统托盘的??
不知这样说,大家能不能看懂,我的语文太差,呵呵

[培训]《安卓高级研修班(网课)》月薪三万计划,掌握调试、分析还原ollvm、vmp的方法,定制art虚拟机自动化脱壳的方法

收藏
免费 0
支持
分享
最新回复 (6)
雪    币: 325
活跃值: (97)
能力值: ( LV13,RANK:530 )
在线值:
发帖
回帖
粉丝
2
BOOL Shell_NotifyIcon(          DWORD dwMessage,
    PNOTIFYICONDATA lpdata
);
Parameters

dwMessage
[in] Variable of type DWORD that specifies the action to be taken. It can have one of the following values.
NIM_ADD
Adds an icon to the status area. The hWnd and uID members of the NOTIFYICONDATA structure pointed to by lpdata will be used to identify the icon in later calls to Shell_NotifyIcon.
NIM_DELETE
Deletes an icon from the status area. Use the hWnd and uID members of the NOTIFYICONDATA structure pointed to by lpdata to identify the icon to be deleted.
NIM_MODIFY
Modifies an icon in the status area. Use the hWnd and uID members of the NOTIFYICONDATA structure pointed to by lpdata to identify the icon to be modified.
NIM_SETFOCUS
Version 5.0. Returns focus to the taskbar notification area. Taskbar icons should use this message when they have completed their user interface operation. For example, if the taskbar icon displays a shortcut menu, but the user presses ESC to cancel it, use NIM_SETFOCUS to return focus to the taskbar notification area.
NIM_SETVERSION
Version 5.0. Instructs the taskbar to behave according to the version number specified in the uVersion member of the structure pointed to by lpdata. This message allows you to specify whether you want the version 5.0 behavior found on Microsoft Windows 2000 systems, or that found with earlier Shell versions. The default value for uVersion is zero, indicating that the original Windows 95 notify icon behavior should be used. For details, see the Remarks section.
lpdata
[in] Pointer to a NOTIFYICONDATA structure. The content of the structure depends on the value of dwMessage.

反复建立就可以了 只要uID不变 是不会新建一个图标的
2006-8-8 23:35
0
雪    币: 95
活跃值: (419)
能力值: ( LV9,RANK:310 )
在线值:
发帖
回帖
粉丝
3
多谢楼上解答,我去研究下哈
2006-8-9 08:50
0
雪    币: 265
活跃值: (56)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
4
能解释下二楼写的是什么东东吗,呵呵,看天书!
2006-8-10 15:18
0
雪    币: 2899
活跃值: (1753)
能力值: ( LV9,RANK:850 )
在线值:
发帖
回帖
粉丝
5
BOOL Shell_NotifyIcon(          DWORD dwMessage,
    PNOTIFYICONDATA lpdata
);
这是一个API函数,调用这个函数,将返回一个逻辑值(Bool),它有两个参数:一个Dword型(实际上就是整型),消息
另一个是PNOTIFYICONDATA(一个结构体指针型)

Parameters
参数说明:

dwMessage
[in] Variable of type DWORD that specifies the action to be taken. It can have one of the following values.
dwMessage 是个Dword型数据,指定了执行该函数后的行为,它有如下几个值:NIM_ADD,NIM_DELETE,NIM_MODIFY,NIM_SETFOCUS,NIM_SETVERSION

NIM_ADD
Adds an icon to the status area. The hWnd and uID members of the NOTIFYICONDATA structure pointed to by lpdata will be used to identify the icon in later calls to Shell_NotifyIcon.
NIM_ADD:在状态区(就是右下角托盘区)增加一个图标,在以后调用Shell_NotifyIcon函数时,由指针lpdata指向的NOTIFYICONDATA 结构体成员hwnd,uID将用来标识这个图标。

NIM_DELETE
Deletes an icon from the status area. Use the hWnd and uID members of the NOTIFYICONDATA structure pointed to by lpdata to identify the icon to be deleted.
NIM_DELETE:从托盘区删除那个指定的图标(注明:当程序退出时,必须调用这个函数,删除在托盘中的图标)

NIM_MODIFY
Modifies an icon in the status area. Use the hWnd and uID members of the NOTIFYICONDATA structure pointed to by lpdata to identify the icon to be modified.
NIM_MODIFY:在托盘区变更指定的图标(有些软件在托盘区的图标会闪动,如接受鼠标事件,显示不同的图标)

下面两个值用得少,就不解释了。英文水平差。
NIM_SETFOCUS
Version 5.0. Returns focus to the taskbar notification area. Taskbar icons should use this message when they have completed their user interface operation. For example, if the taskbar icon displays a shortcut menu, but the user presses ESC to cancel it, use NIM_SETFOCUS to return focus to the taskbar notification area.

NIM_SETVERSION
Version 5.0. Instructs the taskbar to behave according to the version number specified in the uVersion member of the structure pointed to by lpdata. This message allows you to specify whether you want the version 5.0 behavior found on Microsoft Windows 2000 systems, or that found with earlier Shell versions. The default value for uVersion is zero, indicating that the original Windows 95 notify icon behavior should be used. For details, see the Remarks section.

lpdata
[in] Pointer to a NOTIFYICONDATA structure. The content of the structure depends on the value of dwMessage
lpdata:指向NOTIFYICONDATA结构体,这个结构体中的内容,依据dwMessage的值不同而不同。

楼主出现的这种情况一般是软件设计者不小心造成的。另一个原因是在使用过程中由于其它程序出错,系统在刷新时出错,使得托盘图标丢失。
一个办法就是结束这个进程,然后重新启动这个任务,就解决这个问题。
2006-8-11 13:40
0
雪    币: 1489
活跃值: (235)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
6
const UINT WM_TASKBARCREATED = ::RegisterWindowMessage(_T("TaskbarCreated"));

explorer重新启动的话会发WM_TASKBARCREATED,消息的,在这里面重新加图标就可以了,详细的可以在GOOGLE中搜索TaskbarCreated
2006-8-11 16:19
0
雪    币: 265
活跃值: (56)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
7
谢谢,5楼,呵呵,api刚刚接触到,以后看到这个就会自己去查了,学到东西了
2006-8-18 15:48
0
游客
登录 | 注册 方可回帖
返回
//