Changeset 81132 in vbox for trunk/src/VBox/Additions/WINNT/VBoxTray
- Timestamp:
- Oct 7, 2019 6:41:06 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxTray.cpp
r79036 r81132 1138 1138 case WM_VBOXTRAY_TRAY_ICON: 1139 1139 { 1140 switch ( lParam)1140 switch (LOWORD(lParam)) 1141 1141 { 1142 1142 case WM_LBUTTONDBLCLK: 1143 1143 break; 1144 1144 #ifdef DEBUG 1145 1145 case WM_RBUTTONDOWN: 1146 { 1147 POINT lpCursor; 1148 if (GetCursorPos(&lpCursor)) 1149 { 1150 HMENU hContextMenu = CreatePopupMenu(); 1151 if (hContextMenu) 1152 { 1153 UINT_PTR uMenuItem = 9999; 1154 UINT fMenuItem = MF_BYPOSITION | MF_STRING; 1155 if (InsertMenuW(hContextMenu, UINT_MAX, fMenuItem, uMenuItem, L"Exit")) 1156 { 1157 SetForegroundWindow(hWnd); 1158 1159 const bool fBlockWhileTracking = true; 1160 1161 UINT fTrack = TPM_LEFTALIGN | TPM_LEFTBUTTON | TPM_BOTTOMALIGN; 1162 1163 if (fBlockWhileTracking) 1164 fTrack |= TPM_RETURNCMD | TPM_NONOTIFY; 1165 1166 UINT uMsg = TrackPopupMenu(hContextMenu, fTrack, lpCursor.x, lpCursor.y, 0, hWnd, NULL); 1167 if ( uMsg 1168 && fBlockWhileTracking) 1169 { 1170 if (uMsg == uMenuItem) 1171 PostMessage(g_hwndToolWindow, WM_QUIT, 0, 0); 1172 } 1173 else if (!uMsg) 1174 LogFlowFunc(("Tracking popup menu failed with %ld\n", GetLastError())); 1175 } 1176 } 1177 } 1146 1178 break; 1179 } 1180 #endif 1147 1181 } 1148 1182 return 0;
Note:
See TracChangeset
for help on using the changeset viewer.