MSDN上说是在IE4以后的系统中会有这个产生
% p* b' f& }' C% C DWith 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. " V$ }1 E% ^1 f% f( S
LRESULT CALLBACK WndProc(HWND hWnd, UINT uMessage, WPARAM wParam,
) }, N( q& y# r& K( I LPARAM lParam)" \% o5 c* N. T; r1 x4 y
{: W0 ?, J; {! ~+ x
static UINT s_uTaskbarRestart;
, a3 V. e* T& b- q$ J# J' m% t- F0 l/ D6 D5 L* A
switch(uMessage)
; o" w" p: D# G& q: c {1 n! c' v z. x6 F% z
case WM_CREATE:
: x) ~6 ?# A5 v1 r8 x8 m$ F D s_uTaskbarRestart = RegisterWindowMessage(TEXT("TaskbarCreated"));
8 e$ o/ r9 e9 H0 _1 q, }; L; ? break;
2 n3 U) L' y( }9 u2 L F( W/ X( ?4 A; r1 g1 K! e, i
default:
& d& B4 q# Z1 E# t" O$ S9 a if(uMessage == s_uTaskbarRestart)- `8 Z. Z% y6 h
AddTaskbarIcons();1 h8 f2 [6 n5 v/ B$ n4 l$ y1 x
break;
4 F% g* x, B0 p* X- d( p" C5 c }/ ^1 n/ _' L2 i x+ \! P; h
. n4 V7 p& @% n2 y, o' M return DefWindowProc(hWnd, uMessage, wParam, lParam);
- H* ?) i- D) w$ v}
, m- H% U; E( x4 Y[此贴子已经被作者于2004-12-13 23:50:57编辑过] . Y$ A W0 N) I% b
|