Commit 7bf054f1 authored by Hugh McMaster's avatar Hugh McMaster Committed by Alexandre Julliard

regedit: Update and sort the pop-up menus.

parent c5d38ce4
......@@ -378,7 +378,7 @@ LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa
ScreenToClient(g_pChildWnd->hTreeWnd, &ht.pt);
if (SendMessageW(g_pChildWnd->hTreeWnd, TVM_HITTEST, 0, (LPARAM)&ht)) {
SendMessageW(g_pChildWnd->hTreeWnd, TVM_SELECTITEM, TVGN_CARET, (LPARAM)ht.hItem);
TrackPopupMenu(GetSubMenu(hPopupMenus, PM_NEW), TPM_RIGHTBUTTON,
TrackPopupMenu(GetSubMenu(hPopupMenus, PM_TREEVIEW), TPM_RIGHTBUTTON,
pt.x, pt.y, 0, hFrameWnd, NULL);
}
break;
......
......@@ -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_NEW : PM_MODIFYVALUE),
TrackPopupMenu(GetSubMenu(hPopupMenus, cnt == -1 ? PM_TREEVIEW : PM_MODIFY_VALUE),
TPM_RIGHTBUTTON, (short)LOWORD(lParam), (short)HIWORD(lParam),
0, hFrameWnd, NULL);
break;
......
......@@ -32,13 +32,14 @@
#define COUNT_OF(a) (sizeof(a)/sizeof(a[0]))
#define PM_MODIFYVALUE 0
#define PM_NEW 1
#define MAX_NEW_KEY_LEN 128
#define WM_NOTIFY_REFLECT (WM_USER+1024)
/* Pop-Up Menus */
#define PM_TREEVIEW 0
#define PM_MODIFY_VALUE 1
/* HexEdit Class */
#define HEM_SETDATA (WM_USER+0)
#define HEM_GETDATA (WM_USER+1)
......
......@@ -84,14 +84,7 @@ END
IDR_POPUP_MENUS MENU
BEGIN
POPUP ""
BEGIN
MENUITEM "&Modify...", ID_EDIT_MODIFY
MENUITEM "Modify Binary Data...", ID_EDIT_MODIFY_BIN
MENUITEM SEPARATOR
MENUITEM "&Delete\tDel", ID_EDIT_DELETE
MENUITEM "&Rename", ID_EDIT_RENAME
END
/* PM_TREEVIEW */
POPUP ""
BEGIN
POPUP "&New"
......@@ -104,14 +97,23 @@ BEGIN
MENUITEM "&Multi-String Value", ID_EDIT_NEW_MULTI_STRINGVALUE
MENUITEM "&Expandable String Value", ID_EDIT_NEW_EXPANDVALUE
END
MENUITEM "&Find...\tCtrl+F", ID_EDIT_FIND, GRAYED
MENUITEM SEPARATOR
MENUITEM "&Delete\tDel", ID_EDIT_DELETE
MENUITEM "&Rename\tF2", ID_EDIT_RENAME
MENUITEM SEPARATOR
MENUITEM "&Export...", ID_EDIT_EXPORT
MENUITEM "&Copy Key Name", ID_EDIT_COPYKEYNAME
MENUITEM SEPARATOR
MENUITEM "&Find...\tCtrl+F", ID_EDIT_FIND, GRAYED
MENUITEM "&Copy Key Name", ID_EDIT_COPYKEYNAME
END
/* PM_MODIFY_VALUE */
POPUP ""
BEGIN
MENUITEM "&Modify...", ID_EDIT_MODIFY
MENUITEM "Modify Binary Data...", ID_EDIT_MODIFY_BIN
MENUITEM SEPARATOR
MENUITEM "&Delete\tDel", ID_EDIT_DELETE
MENUITEM "&Rename", ID_EDIT_RENAME
END
END
......
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