MSDN上说是在IE4以后的系统中会有这个产生
" u- Z9 f% [2 [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.
/ j& i K" D& H3 }3 Q- h/ I1 eLRESULT CALLBACK WndProc(HWND hWnd, UINT uMessage, WPARAM wParam, 8 A* \+ B. D1 o) }. P
LPARAM lParam)
* h ~( q ?0 M, ~9 W5 h' q% a{& f2 I+ d1 N/ U6 d( g& i! _
static UINT s_uTaskbarRestart;8 ~* e) x, u8 M0 b+ t" K# ~; J9 Q
8 |, W; y" @4 Y& b1 _7 b* C, C5 X7 p5 L
switch(uMessage)( S; o: @) j# }6 f E
{) s5 W7 D" P* j, {7 O+ M
case WM_CREATE:
5 B3 P; O- N- z1 v0 f3 A0 e" R) I s_uTaskbarRestart = RegisterWindowMessage(TEXT("TaskbarCreated"));
3 D- M) I$ ^! Z( O% g' W1 n break;5 C/ g1 N. Y' W F0 E; w, s
; u/ P* ]1 t N# c1 b
default:8 x# z9 i& z. g7 c
if(uMessage == s_uTaskbarRestart)
' v1 Y6 ^' H" P AddTaskbarIcons();
' V {8 k. C2 m, j8 X break;. k. d2 H( I; o0 w
}/ R, f* F" W( I- n
% r0 `- f4 f7 W return DefWindowProc(hWnd, uMessage, wParam, lParam);' ^2 T/ k0 ~" c( B4 l ~
}
8 _' k+ L. c% O( J6 e! H[此贴子已经被作者于2004-12-13 23:50:57编辑过] $ w) S$ x6 n; t+ \& c1 `; w& \, b
|