From a65891147dfdcf90a238ba4def266fe15f2e6491 Mon Sep 17 00:00:00 2001 From: Christoph von Wittich Date: Fri, 23 May 2014 17:28:39 +0000 Subject: [PATCH] [shell32] set first verb as default fixes opening control panel applets by double click svn path=/trunk/; revision=63424 --- reactos/dll/win32/shell32/defcontextmenu.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/reactos/dll/win32/shell32/defcontextmenu.cpp b/reactos/dll/win32/shell32/defcontextmenu.cpp index 6c5b2b84bee..2de0965d002 100644 --- a/reactos/dll/win32/shell32/defcontextmenu.cpp +++ b/reactos/dll/win32/shell32/defcontextmenu.cpp @@ -600,8 +600,13 @@ CDefaultContextMenu::AddStaticContextMenusToMenu( fState = MFS_ENABLED; mii.dwTypeData = NULL; + /* set first entry as default */ + if (pEntry == m_pStaticEntries) + fState |= MFS_DEFAULT; + if (!wcsicmp(pEntry->szVerb, L"open")) { + /* override default when open verb is found */ fState |= MFS_DEFAULT; idResource = IDS_OPEN_VERB; }