regedit: add accelerators
Dimitrie O. Paun
dpaun at rogers.com
Sat Mar 13 19:51:24 CST 2004
ChangeLog
Add all needed accelerators to regedit. Cleanups.
Index: programs/regedit/rsrc.rc
===================================================================
RCS file: /var/cvs/wine/programs/regedit/rsrc.rc,v
retrieving revision 1.8
diff -u -r1.8 rsrc.rc
--- programs/regedit/rsrc.rc 21 Nov 2003 21:33:02 -0000 1.8
+++ programs/regedit/rsrc.rc 13 Mar 2004 14:58:04 -0000
@@ -25,6 +25,16 @@
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
+IDC_REGEDIT ACCELERATORS
+{
+ "^F", ID_EDIT_FIND
+ "^P", ID_REGISTRY_PRINT
+ VK_DELETE, ID_EDIT_DELETE, VIRTKEY
+ VK_F1, ID_HELP_HELPTOPICS, VIRTKEY
+ VK_F3, ID_EDIT_FINDNEXT, VIRTKEY
+ VK_F5, ID_VIEW_REFRESH, VIRTKEY
+}
+
#include "resource.rc"
/* include localised resources */
Index: programs/regedit/main.c
===================================================================
RCS file: /var/cvs/wine/programs/regedit/main.c,v
retrieving revision 1.9
diff -u -r1.9 main.c
--- programs/regedit/main.c 16 Jan 2004 21:20:54 -0000 1.9
+++ programs/regedit/main.c 13 Mar 2004 15:05:47 -0000
@@ -151,29 +151,15 @@
{
MSG msg;
HACCEL hAccel;
- /*
- int hCrt;
- FILE *hf;
- AllocConsole();
- hCrt = _open_osfhandle((long)GetStdHandle(STD_OUTPUT_HANDLE), _O_TEXT);
- hf = _fdopen(hCrt, "w");
- *stdout = *hf;
- setvbuf(stdout, NULL, _IONBF, 0);
-
- wprintf(L"command line exit, hInstance = %d\n", hInstance);
- getch();
- FreeConsole();
- return 0;
- */
if (ProcessCmdLine(lpCmdLine)) {
return 0;
}
/* Initialize global strings */
- LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
- LoadString(hInstance, IDC_REGEDIT_FRAME, szFrameClass, MAX_LOADSTRING);
- LoadString(hInstance, IDC_REGEDIT, szChildClass, MAX_LOADSTRING);
+ LoadString(hInstance, IDS_APP_TITLE, szTitle, COUNT_OF(szTitle));
+ LoadString(hInstance, IDC_REGEDIT_FRAME, szFrameClass, COUNT_OF(szFrameClass));
+ LoadString(hInstance, IDC_REGEDIT, szChildClass, COUNT_OF(szChildClass));
/* Store instance handle in our global variable */
hInst = hInstance;
@@ -186,7 +172,7 @@
/* Main message loop */
while (GetMessage(&msg, (HWND)NULL, 0, 0)) {
- if (!TranslateAccelerator(msg.hwnd, hAccel, &msg) &&
+ if (!TranslateAccelerator(hFrameWnd, hAccel, &msg) &&
!IsDialogMessage(hFrameWnd, &msg)) {
TranslateMessage(&msg);
DispatchMessage(&msg);
--
Dimi.
More information about the wine-patches
mailing list