[vbox-dev] a minor VBoxTray bug - need to handle "TaskbarCreated" message

Huihong Luo huisinro at yahoo.com
Tue Jul 20 00:55:27 GMT 2010


http://msdn.microsoft.com/en-us/library/cc144179(VS.85).aspx
 
has some info
 
when Explorer.exe is killed, and restart, the system tray icon dispears, because it doesn't handle "TaskbarCreated" message.
 
The correction can be done as follows:
 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);
}

 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.virtualbox.org/pipermail/vbox-dev/attachments/20100719/1f1354e3/attachment.html>


More information about the vbox-dev mailing list