Menu

#16 icon vanishes when explorer crashes

open
nobody
win32 (3)
5
2005-07-13
2005-07-13
Anonymous
No

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.

Discussion

  • jrscpa

    jrscpa - 2005-10-07

    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.

     
  • Selly

    Selly - 2006-01-06

    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(&quot;TaskbarCreated&quot;)
    . Window callback function can then recognize IE restart by
    checking message type (=m_is). I think this could help.

     

Log in to post a comment.

Auth0 Logo