Add all needed accelerators to regedit. Cleanups.
This commit is contained in:
parent
65be0d1f50
commit
eb9d0e929a
|
@ -151,29 +151,15 @@ int APIENTRY WinMain(HINSTANCE hInstance,
|
|||
{
|
||||
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 @@ int APIENTRY WinMain(HINSTANCE hInstance,
|
|||
|
||||
/* 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);
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue