Regedit: Implemented accelerator keys
authorNathan Woods <npwoods@mess.org>
Mon, 28 Nov 2005 23:58:49 +0000 (23:58 +0000)
committerNathan Woods <npwoods@mess.org>
Mon, 28 Nov 2005 23:58:49 +0000 (23:58 +0000)
svn path=/trunk/; revision=19737

reactos/subsys/system/regedit/main.c
reactos/subsys/system/regedit/resource.h
reactos/subsys/system/regedit/rsrc.rc

index 818e6fd..174e3c8 100644 (file)
@@ -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);
index 3a459c3..46ba6b7 100644 (file)
 #define ID_FAVORITES_MIN                2100
 #define ID_FAVORITES_MAX                2999
 
+#define ID_ACCEL                        3000
+
 #define IDC_STATIC                      -1
index 4a9a344..f810c97 100644 (file)
 #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