From 754a35b210485879d979f187531b6a68a41aa468 Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Mon, 22 Apr 2019 10:36:17 +0200 Subject: [PATCH] [STOBJECT] Mark hotplug, power and volume context menu default items --- dll/shellext/stobject/hotplug.cpp | 1 + dll/shellext/stobject/power.cpp | 1 + dll/shellext/stobject/volume.cpp | 1 + 3 files changed, 3 insertions(+) diff --git a/dll/shellext/stobject/hotplug.cpp b/dll/shellext/stobject/hotplug.cpp index 1d2a58774f4..af7d69891bd 100644 --- a/dll/shellext/stobject/hotplug.cpp +++ b/dll/shellext/stobject/hotplug.cpp @@ -219,6 +219,7 @@ static void _ShowContextMenuR(CSysTray * pSysTray) CString strMenu((LPWSTR)IDS_HOTPLUG_REMOVE_2); HMENU hPopup = CreatePopupMenu(); AppendMenuW(hPopup, MF_STRING, IDS_HOTPLUG_REMOVE_2, strMenu); + SetMenuDefaultItem(hPopup, IDS_HOTPLUG_REMOVE_2, FALSE); SetForegroundWindow(pSysTray->GetHWnd()); DWORD flags = TPM_RETURNCMD | TPM_NONOTIFY | TPM_RIGHTALIGN | TPM_BOTTOMALIGN; diff --git a/dll/shellext/stobject/power.cpp b/dll/shellext/stobject/power.cpp index 347fb01e53f..6cb16fdbc95 100644 --- a/dll/shellext/stobject/power.cpp +++ b/dll/shellext/stobject/power.cpp @@ -148,6 +148,7 @@ static void _ShowContextMenu(CSysTray * pSysTray) CString strOpen((LPCSTR)IDS_PWR_PROPERTIES); HMENU hPopup = CreatePopupMenu(); AppendMenuW(hPopup, MF_STRING, IDS_PWR_PROPERTIES, strOpen); + SetMenuDefaultItem(hPopup, IDS_PWR_PROPERTIES, FALSE); SetForegroundWindow(pSysTray->GetHWnd()); DWORD flags = TPM_RETURNCMD | TPM_NONOTIFY | TPM_RIGHTALIGN | TPM_BOTTOMALIGN; diff --git a/dll/shellext/stobject/volume.cpp b/dll/shellext/stobject/volume.cpp index c30df9cae05..dbc92ad5ce1 100644 --- a/dll/shellext/stobject/volume.cpp +++ b/dll/shellext/stobject/volume.cpp @@ -234,6 +234,7 @@ static void _ShowContextMenu(CSysTray * pSysTray) HMENU hPopup = CreatePopupMenu(); AppendMenuW(hPopup, MF_STRING, IDS_VOL_OPEN, strOpen); AppendMenuW(hPopup, MF_STRING, IDS_VOL_ADJUST, strAdjust); + SetMenuDefaultItem(hPopup, IDS_VOL_OPEN, FALSE); DWORD flags = TPM_RETURNCMD | TPM_NONOTIFY | TPM_RIGHTALIGN | TPM_BOTTOMALIGN; POINT pt; -- 2.17.1