From 7f7f720f94092269df599cbc81fb5bc84bfa021d Mon Sep 17 00:00:00 2001 From: Kazuhiro Fujieda Date: Fri, 22 Apr 2011 00:29:41 +0900 Subject: [PATCH] CUtils::IsDialog detects a sound box in Internet Explorer isn't a dialog. --- xkeymacsdll/Utils.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xkeymacsdll/Utils.cpp b/xkeymacsdll/Utils.cpp index ac7ceff..88eabf5 100644 --- a/xkeymacsdll/Utils.cpp +++ b/xkeymacsdll/Utils.cpp @@ -843,6 +843,10 @@ int CUtils::GetClipboardTextLength() BOOL CUtils::IsDialog() { + HWND hwnd = GetForegroundWindow(); + TCHAR szWindowText[0x100] = {'\0'}; + if (!GetWindowText(hwnd, szWindowText, sizeof(szWindowText))) + return FALSE; // inside sound box return GetParent(GetForegroundWindow()) != NULL; } -- 2.11.0