Add all needed accelerators to regedit. Cleanups.

This commit is contained in:
Dimitrie O. Paun 2004-03-15 20:07:44 +00:00 committed by Alexandre Julliard
parent 65be0d1f50
commit eb9d0e929a
2 changed files with 14 additions and 18 deletions

View File

@ -151,29 +151,15 @@ int APIENTRY WinMain(HINSTANCE hInstance,
{ {
MSG msg; MSG msg;
HACCEL hAccel; 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)) { if (ProcessCmdLine(lpCmdLine)) {
return 0; return 0;
} }
/* Initialize global strings */ /* Initialize global strings */
LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING); LoadString(hInstance, IDS_APP_TITLE, szTitle, COUNT_OF(szTitle));
LoadString(hInstance, IDC_REGEDIT_FRAME, szFrameClass, MAX_LOADSTRING); LoadString(hInstance, IDC_REGEDIT_FRAME, szFrameClass, COUNT_OF(szFrameClass));
LoadString(hInstance, IDC_REGEDIT, szChildClass, MAX_LOADSTRING); LoadString(hInstance, IDC_REGEDIT, szChildClass, COUNT_OF(szChildClass));
/* Store instance handle in our global variable */ /* Store instance handle in our global variable */
hInst = hInstance; hInst = hInstance;
@ -186,7 +172,7 @@ int APIENTRY WinMain(HINSTANCE hInstance,
/* Main message loop */ /* Main message loop */
while (GetMessage(&msg, (HWND)NULL, 0, 0)) { while (GetMessage(&msg, (HWND)NULL, 0, 0)) {
if (!TranslateAccelerator(msg.hwnd, hAccel, &msg) && if (!TranslateAccelerator(hFrameWnd, hAccel, &msg) &&
!IsDialogMessage(hFrameWnd, &msg)) { !IsDialogMessage(hFrameWnd, &msg)) {
TranslateMessage(&msg); TranslateMessage(&msg);
DispatchMessage(&msg); DispatchMessage(&msg);

View File

@ -25,6 +25,16 @@
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL 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 "resource.rc"
/* include localised resources */ /* include localised resources */