From 83335d3a81090c6870e607a22f0841207eee503c Mon Sep 17 00:00:00 2001 From: Scott Maday Date: Thu, 18 Nov 2021 15:41:53 -0600 Subject: [PATCH] [SHELL32] Control panel context menu semantic bugfix (#4078) --- dll/win32/shell32/folders/CControlPanelFolder.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dll/win32/shell32/folders/CControlPanelFolder.cpp b/dll/win32/shell32/folders/CControlPanelFolder.cpp index 10cac48ac82..e4133520100 100644 --- a/dll/win32/shell32/folders/CControlPanelFolder.cpp +++ b/dll/win32/shell32/folders/CControlPanelFolder.cpp @@ -676,9 +676,9 @@ HRESULT WINAPI CCPLItemMenu::QueryContextMenu( UINT idCmdLast, UINT uFlags) { - _InsertMenuItemW(hMenu, indexMenu++, TRUE, IDS_OPEN, MFT_STRING, MAKEINTRESOURCEW(IDS_OPEN), MFS_DEFAULT); - _InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + 1, MFT_SEPARATOR, NULL, MFS_ENABLED); - _InsertMenuItemW(hMenu, indexMenu++, TRUE, IDS_CREATELINK, MFT_STRING, MAKEINTRESOURCEW(IDS_CREATELINK), MFS_ENABLED); + _InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst, MFT_STRING, MAKEINTRESOURCEW(IDS_OPEN), MFS_DEFAULT); + _InsertMenuItemW(hMenu, indexMenu++, TRUE, IDC_STATIC, MFT_SEPARATOR, NULL, MFS_ENABLED); + _InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + 1, MFT_STRING, MAKEINTRESOURCEW(IDS_CREATELINK), MFS_ENABLED); return MAKE_HRESULT(SEVERITY_SUCCESS, 0, 2); } @@ -699,7 +699,7 @@ HRESULT WINAPI CCPLItemMenu::InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi) TRACE("(%p)->(invcom=%p verb=%p wnd=%p)\n", this, lpcmi, lpcmi->lpVerb, lpcmi->hwnd); - if (lpcmi->lpVerb == MAKEINTRESOURCEA(IDS_OPEN)) //FIXME + if (lpcmi->lpVerb == MAKEINTRESOURCEA(0)) { /* Hardcode the command here; Executing a cpl file would be fine but we also need to run things like console.dll */ WCHAR wszParams[MAX_PATH]; @@ -711,7 +711,7 @@ HRESULT WINAPI CCPLItemMenu::InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi) /* Note: we pass the applet name to Control_RunDLL to distinguish between multiple applets in one .cpl file */ ShellExecuteW(NULL, NULL, wszFile, wszParams, NULL, 0); } - else if (lpcmi->lpVerb == MAKEINTRESOURCEA(IDS_CREATELINK)) //FIXME + else if (lpcmi->lpVerb == MAKEINTRESOURCEA(1)) //FIXME { CComPtr pDataObj; LPITEMIDLIST pidl = _ILCreateControlPanel();