icon vanishes when explorer crashes
Brought to you by:
daveselinger,
ribizli
I'm using version 2.4.1
When explorer crashes (which everybody knows happens
too often) and then restarts, some applications detect
that and reinsert their icons into the systray.
systray4j is not one of them.
can something be done about that?
other than that, i really like systray4j! it makes the
creation of system tray icons and menus real easy!
Thanks,
Tal.
Logged In: YES
user_id=1272475
I would submit a patch if I had VC++, but it's easy to fix.
1) create private static UINT member of the SysTrayMenu
class s_TaskbarCreated
2) add this to wndProc switch:
case WM_CREATE:
{
s_TaskbarCreated = RegisterWindowMessage("TaskbarCreated");
break;
}
3) also change the default case:
default:
{
if( message == s_TaskbarCreated )
{
SysTrayMenu* pstMenu;
map< UINT, SysTrayMenu* >::iterator i =
s_pMainMenuMap->begin();
while( i != s_pMainMenuMap->end() )
{
pstMenu = i->second;
Shell_NotifyIcon( NIM_ADD, &pstMenu->m_niData );
i++;
}
}
else
return DefWindowProc (hWnd, iMessage, wParam, lParam) ;
}
4) That's it, but sadly I think this project has been abandoned.
Logged In: YES
user_id=1074673
From [780040]
Under Windows IE sends a message (here m_id), when it is
reloaded. In C++ code (I don't know Java much) m_id could
be
get by calling
m_id=RegisterWindowMessage("TaskbarCreated")
. Window callback function can then recognize IE restart by
checking message type (=m_is). I think this could help.