<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><DIV><A href="http://msdn.microsoft.com/en-us/library/cc144179(VS.85).aspx">http://msdn.microsoft.com/en-us/library/cc144179(VS.85).aspx</A></DIV>
<DIV> </DIV>
<DIV>has some info</DIV>
<DIV> </DIV>
<DIV>when Explorer.exe is killed, and restart, the system tray icon dispears, because it doesn't handle "TaskbarCreated" message.</DIV>
<DIV> </DIV>
<DIV>The correction can be done as follows:</DIV>
<DIV> </DIV><PRE>LRESULT CALLBACK WndProc(HWND hWnd,
UINT uMessage,
WPARAM wParam,
LPARAM lParam)
{
static UINT s_uTaskbarRestart;
switch(uMessage)
{
case WM_CREATE:
s_uTaskbarRestart = RegisterWindowMessage(TEXT("TaskbarCreated"));
break;
default:
if(uMessage == s_uTaskbarRestart)
AddTaskbarIcons();
break;
}
return DefWindowProc(hWnd, uMessage, wParam, lParam);
}
</PRE>
<DIV> </DIV></td></tr></table>