MSDN上说是在IE4以后的系统中会有这个产生
9 S) v8 F6 i/ f' I% v7 Q7 HWith 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.
( M: g1 D$ W: H9 K/ ~- q YLRESULT CALLBACK WndProc(HWND hWnd, UINT uMessage, WPARAM wParam, ' l( Z" d6 X; N5 F& ]( d7 \$ w
LPARAM lParam)
! w- C6 x+ q% o3 c( `& ~{) j2 d; d# R8 i1 u; R
static UINT s_uTaskbarRestart;7 ~# R9 [ |0 p- S
+ v. H8 F; I# I6 j9 M5 |
switch(uMessage)7 m: i5 S9 U8 v0 {, Y" R
{
* E9 f+ m" X x$ k case WM_CREATE:
" o# h7 A: M; o3 s M% o% S4 v9 P s_uTaskbarRestart = RegisterWindowMessage(TEXT("TaskbarCreated"));
5 r0 k8 W8 W/ k2 k! {, q0 J# P2 X break;
2 r" G) n, V/ x$ k& X0 t & d% R5 v2 w- E
default:9 F W% T2 x7 y
if(uMessage == s_uTaskbarRestart); S9 l n" q' J, N9 G2 h
AddTaskbarIcons();0 P; n$ j" X) N2 p/ D: f1 C" W8 r
break;
+ ]+ Z' w, E0 |7 |1 t& _5 l }1 c, D+ @! p! K$ D/ |2 O) X/ I: J
3 J5 w& | b' X8 R2 M9 k+ g return DefWindowProc(hWnd, uMessage, wParam, lParam);
# ~2 Y" }5 l. z2 w8 c( m}0 O8 U3 _; \) H
[此贴子已经被作者于2004-12-13 23:50:57编辑过] ( Q& |) ]4 z# y
|