From da63a147f4826abc3d42ea70aa755f57b79e81aa Mon Sep 17 00:00:00 2001 From: Nathan Woods Date: Mon, 28 Nov 2005 23:58:49 +0000 Subject: [PATCH] Regedit: Implemented accelerator keys svn path=/trunk/; revision=19737 --- reactos/subsys/system/regedit/main.c | 4 ++-- reactos/subsys/system/regedit/resource.h | 2 ++ reactos/subsys/system/regedit/rsrc.rc | 9 +++++++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/reactos/subsys/system/regedit/main.c b/reactos/subsys/system/regedit/main.c index 818e6fd3e3a..174e3c8c09b 100644 --- a/reactos/subsys/system/regedit/main.c +++ b/reactos/subsys/system/regedit/main.c @@ -242,11 +242,11 @@ int APIENTRY WinMain(HINSTANCE hInstance, if (!InitInstance(hInstance, nCmdShow)) { return FALSE; } - hAccel = LoadAccelerators(hInstance, (LPCTSTR)IDC_REGEDIT); + hAccel = LoadAccelerators(hInstance, MAKEINTRESOURCE(ID_ACCEL)); /* Main message loop */ while (GetMessage(&msg, (HWND)NULL, 0, 0)) { - if (!TranslateAccelerator(msg.hwnd, hAccel, &msg) + if (!TranslateAccelerator(hFrameWnd, hAccel, &msg) && !TranslateChildTabMessage(&msg)) { TranslateMessage(&msg); DispatchMessage(&msg); diff --git a/reactos/subsys/system/regedit/resource.h b/reactos/subsys/system/regedit/resource.h index 3a459c3f14b..46ba6b7a586 100644 --- a/reactos/subsys/system/regedit/resource.h +++ b/reactos/subsys/system/regedit/resource.h @@ -206,4 +206,6 @@ #define ID_FAVORITES_MIN 2100 #define ID_FAVORITES_MAX 2999 +#define ID_ACCEL 3000 + #define IDC_STATIC -1 diff --git a/reactos/subsys/system/regedit/rsrc.rc b/reactos/subsys/system/regedit/rsrc.rc index 4a9a34481d2..f810c97046a 100644 --- a/reactos/subsys/system/regedit/rsrc.rc +++ b/reactos/subsys/system/regedit/rsrc.rc @@ -21,6 +21,15 @@ #include "windows.h" #include "resource.h" +ID_ACCEL ACCELERATORS +{ + VK_DELETE, ID_EDIT_DELETE, VIRTKEY, NOINVERT + "^F", ID_EDIT_FIND + VK_F3, ID_EDIT_FINDNEXT, VIRTKEY, NOINVERT + VK_F5, ID_VIEW_REFRESH, VIRTKEY, NOINVERT + VK_F1, ID_HELP_HELPTOPICS, VIRTKEY, NOINVERT +} + /* define language neutral resources */ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL -- 2.17.1