Commit e880c9ca authored by Hugh McMaster's avatar Hugh McMaster Committed by Alexandre Julliard

regedit: Only show the 'New' pop-up menu when right-clicking beneath the listview item list.

parent 7bf054f1
......@@ -463,7 +463,7 @@ static LRESULT CALLBACK ListWndProc(HWND hWnd, UINT message, WPARAM wParam, LPAR
break;
case WM_CONTEXTMENU: {
int cnt = SendMessageW(hWnd, LVM_GETNEXTITEM, -1, MAKELPARAM(LVNI_SELECTED, 0));
TrackPopupMenu(GetSubMenu(hPopupMenus, cnt == -1 ? PM_TREEVIEW : PM_MODIFY_VALUE),
TrackPopupMenu(GetSubMenu(hPopupMenus, cnt == -1 ? PM_NEW_VALUE : PM_MODIFY_VALUE),
TPM_RIGHTBUTTON, (short)LOWORD(lParam), (short)HIWORD(lParam),
0, hFrameWnd, NULL);
break;
......
......@@ -38,7 +38,8 @@
/* Pop-Up Menus */
#define PM_TREEVIEW 0
#define PM_MODIFY_VALUE 1
#define PM_NEW_VALUE 1
#define PM_MODIFY_VALUE 2
/* HexEdit Class */
#define HEM_SETDATA (WM_USER+0)
......
......@@ -106,6 +106,20 @@ BEGIN
MENUITEM SEPARATOR
MENUITEM "&Copy Key Name", ID_EDIT_COPYKEYNAME
END
/* PM_NEW_VALUE */
POPUP ""
BEGIN
POPUP "&New"
BEGIN
MENUITEM "&Key", ID_EDIT_NEW_KEY
MENUITEM SEPARATOR
MENUITEM "&String Value", ID_EDIT_NEW_STRINGVALUE
MENUITEM "&Binary Value", ID_EDIT_NEW_BINARYVALUE
MENUITEM "&DWORD Value", ID_EDIT_NEW_DWORDVALUE
MENUITEM "&Multi-String Value", ID_EDIT_NEW_MULTI_STRINGVALUE
MENUITEM "&Expandable String Value", ID_EDIT_NEW_EXPANDVALUE
END
END
/* PM_MODIFY_VALUE */
POPUP ""
BEGIN
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment