下沙论坛

 找回密码
 注册论坛(EC通行证)

用新浪微博连接

一步搞定

QQ登录

QQ登录

下沙大学生网QQ群8(千人群)
群号:6490324 ,验证:下沙大学生网。
用手机发布本地信息严禁群发,各种宣传贴请发表在下沙信息版块有问必答,欢迎提问 提升会员等级,助你宣传
新会员必读 大学生的论坛下沙新生必读下沙币获得方法及使用
查看: 5320|回复: 10
打印 上一主题 下一主题

[VC孤芳自赏]NT下Explorer崩溃后NotifyTray图标的生成

[复制链接]

该用户从未签到

1
发表于 2004-12-13 23:50:00 | 显示全部楼层

MSDN上说是在IE4以后的系统中会有这个产生

' S! G- R X$ N; U

With Internet Explorer 4.0 and later, the Shell notifies applications that the taskbar has been created. When the taskbar is created, it registers a message with the TaskbarCreated string and then broadcasts this message to all top-level windows. When your taskbar application receives this message, it should assume that any taskbar icons it added have been removed and add them again. This feature generally applies only to services that are already running when the Shell begins execution. The following example shows a very simplified method for handling this case.

3 H$ l5 W7 Z+ q1 J7 d: i LRESULT CALLBACK WndProc(HWND hWnd, UINT uMessage, WPARAM wParam, % W2 e' k- m) K$ N" N! F LPARAM lParam) + }4 X& E0 O; d) z8 m8 V( B4 ]{ : ^; F& J6 ]& S$ U0 ^/ I% U2 o static UINT s_uTaskbarRestart; 3 j* [' E B9 A! v9 x! B) s8 [: F0 i V8 q X. E switch(uMessage) 2 A4 j4 \! j7 [5 D { 7 u# Y Q8 R4 C/ _( o case WM_CREATE: ; Y5 W5 G' F" b s_uTaskbarRestart = RegisterWindowMessage(TEXT("TaskbarCreated"));1 ` Z- U& {! M. Q$ v: d. U! R break; & X$ O' Q: t/ b; R : a A# h# Z- O4 t" c: g" Y2 p default:' p: F0 ]) W- o if(uMessage == s_uTaskbarRestart). b T" s/ G7 U3 F8 U( }8 O AddTaskbarIcons();# I- [. n9 X* B; V* }$ N" d7 W6 f break;5 K' z) G. d7 l }4 ]# {! Y5 f! x/ n/ d ( F/ r0 g" w# V/ [1 W% j3 k return DefWindowProc(hWnd, uMessage, wParam, lParam); 8 |. C3 ^- s$ Q0 P# l, T}. |- c, ^! S9 d. i
[此贴子已经被作者于2004-12-13 23:50:57编辑过]
6 b/ R' |/ j3 ~ O8 k

该用户从未签到

2
发表于 2005-2-6 17:36:00 | 显示全部楼层
编译后的文件还有意义吗?

本版积分规则

关闭

下沙大学生网推荐上一条 /1 下一条

快速回复 返回顶部 返回列表