From f59b70b301e88b7fc217b0598c63aee4bc43cd13 Mon Sep 17 00:00:00 2001 From: Rainer Kottenhoff Date: Thu, 30 Nov 2017 12:15:04 +0100 Subject: [PATCH] + clean code refactoring --- src/Notepad3.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Notepad3.c b/src/Notepad3.c index 65415bc31..e6fc4caa7 100644 --- a/src/Notepad3.c +++ b/src/Notepad3.c @@ -667,10 +667,12 @@ int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInst,LPSTR lpCmdLine,int n while (GetMessage(&msg,NULL,0,0)) { - if (IsWindow(hDlgFindReplace) && (msg.hwnd == hDlgFindReplace || IsChild(hDlgFindReplace, msg.hwnd))) - if (TranslateAccelerator(hDlgFindReplace, hAccFindReplace, &msg) || IsDialogMessage(hDlgFindReplace, &msg)) + if (IsWindow(hDlgFindReplace) && ((msg.hwnd == hDlgFindReplace) || IsChild(hDlgFindReplace, msg.hwnd))) + { + int iTr = TranslateAccelerator(hDlgFindReplace, hAccFindReplace, &msg); + if (iTr || IsDialogMessage(hDlgFindReplace, &msg)) continue; - + } if (!TranslateAccelerator(hwnd,hAccMain,&msg)) { TranslateMessage(&msg); DispatchMessage(&msg);