VirtualBox

Changeset 23055 in vbox for trunk/src/VBox/Additions


Ignore:
Timestamp:
Sep 16, 2009 9:30:30 AM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
52380
Message:

VBoxTray: Added skeleton for tray icon event handling.

Location:
trunk/src/VBox/Additions/WINNT/VBoxTray
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxTray.cpp

    r23053 r23055  
    228228    HWND hWin;
    229229    DWORD hThread, hCurrentThread;
    230    
     230
    231231    GetCursorPos(&mousePos);
    232232    hWin = WindowFromPoint(mousePos);
     
    410410    ndata.uID              = ID_TRAYICON;
    411411    ndata.uFlags           = NIF_ICON | NIF_MESSAGE | NIF_TIP;
    412     ndata.uCallbackMessage = WM_USER;
     412    ndata.uCallbackMessage = WM_VBOX_TRAY;
    413413    ndata.hIcon            = LoadIcon(gInstance, MAKEINTRESOURCE(IDI_VIRTUALBOX));
    414414    sprintf(ndata.szTip, "Sun VirtualBox Guest Additions %d.%d.%dr%d", VBOX_VERSION_MAJOR, VBOX_VERSION_MINOR, VBOX_VERSION_BUILD, VBOX_SVN_REV);
     
    477477                {
    478478                    /* Check in 10 seconds (@todo make seconds configurable) ... */
    479                     SetTimer(gToolWindow, 
    480                              WM_VBOX_CHECK_HOSTVERSION, 
     479                    SetTimer(gToolWindow,
     480                             WM_VBOX_CHECK_HOSTVERSION,
    481481                             10000, /* 10 seconds */
    482482                             NULL   /* no timerproc */);
     
    568568
    569569        case WM_TIMER:
    570 
    571             switch (wParam)
    572             {
     570            switch (wParam)
     571            {
    573572                case WM_VBOX_CHECK_HOSTVERSION:
    574573                    if (RT_SUCCESS(VBoxCheckHostVersion()))
     
    585584            break;
    586585
     586        case WM_VBOX_TRAY:
     587            switch (lParam)
     588            {
     589                case WM_LBUTTONDBLCLK:
     590                    break;
     591
     592                case WM_RBUTTONDOWN:
     593                    break;
     594            }
     595            break;
     596
    587597        case WM_VBOX_INSTALL_SEAMLESS_HOOK:
    588598            VBoxSeamlessInstallHook();
  • trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxTray.h

    r23053 r23055  
    4040#define WM_VBOX_CHECK_VRDP              WM_APP + 2
    4141#define WM_VBOX_CHECK_HOSTVERSION       WM_APP + 3
     42#define WM_VBOX_TRAY                    WM_APP + 4
    4243
    4344#define ID_TRAYICON                     2000
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette